expose port and add networks
This commit is contained in:
@@ -15,5 +15,7 @@ RUN pip3 install --no-cache-dir -r requirements.txt
|
|||||||
# Copy the rest of the application code
|
# Copy the rest of the application code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
# Set the command to run your application
|
# Set the command to run your application
|
||||||
CMD ["/bin/sh", "entrypoint.sh"]
|
CMD ["/bin/sh", "entrypoint.sh"]
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ services:
|
|||||||
- DB_SERVER=${DB_SERVER}
|
- DB_SERVER=${DB_SERVER}
|
||||||
- DB_PORT=3306
|
- DB_PORT=3306
|
||||||
container_name: "${BACKEND_CT_NAME:-juhannus-invitation-backend}"
|
container_name: "${BACKEND_CT_NAME:-juhannus-invitation-backend}"
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
- npm
|
||||||
depends_on:
|
depends_on:
|
||||||
- db # Ensure backend waits for db to start
|
- db # Ensure backend waits for db to start
|
||||||
db:
|
db:
|
||||||
@@ -20,12 +23,21 @@ services:
|
|||||||
- MYSQL_DATABASE=${DB_NAME}
|
- MYSQL_DATABASE=${DB_NAME}
|
||||||
volumes:
|
volumes:
|
||||||
- invitation_db_volume:/var/lib/mysql
|
- invitation_db_volume:/var/lib/mysql
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
context: frontend
|
context: frontend
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: "${FRONTEND_CT_NAME:-juhannus-invitation-frontend}"
|
container_name: "${FRONTEND_CT_NAME:-juhannus-invitation-frontend}"
|
||||||
|
networks:
|
||||||
|
- npm
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend # Ensure fronetnd waits for backend to start
|
- backend # Ensure fronetnd waits for backend to start
|
||||||
volumes:
|
volumes:
|
||||||
invitation_db_volume:
|
invitation_db_volume:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
npm:
|
||||||
|
external: true
|
||||||
|
backend:
|
||||||
|
|||||||
Reference in New Issue
Block a user