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 . .
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
# Set the command to run your application
|
||||
CMD ["/bin/sh", "entrypoint.sh"]
|
||||
|
||||
@@ -10,6 +10,9 @@ services:
|
||||
- DB_SERVER=${DB_SERVER}
|
||||
- DB_PORT=3306
|
||||
container_name: "${BACKEND_CT_NAME:-juhannus-invitation-backend}"
|
||||
networks:
|
||||
- backend
|
||||
- npm
|
||||
depends_on:
|
||||
- db # Ensure backend waits for db to start
|
||||
db:
|
||||
@@ -20,12 +23,21 @@ services:
|
||||
- MYSQL_DATABASE=${DB_NAME}
|
||||
volumes:
|
||||
- invitation_db_volume:/var/lib/mysql
|
||||
networks:
|
||||
- backend
|
||||
frontend:
|
||||
build:
|
||||
context: frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: "${FRONTEND_CT_NAME:-juhannus-invitation-frontend}"
|
||||
networks:
|
||||
- npm
|
||||
depends_on:
|
||||
- backend # Ensure fronetnd waits for backend to start
|
||||
volumes:
|
||||
invitation_db_volume:
|
||||
|
||||
networks:
|
||||
npm:
|
||||
external: true
|
||||
backend:
|
||||
|
||||
Reference in New Issue
Block a user