expose port and add networks

This commit is contained in:
tylen
2026-05-05 12:11:41 +03:00
parent 5d231645a7
commit ca31498cec
2 changed files with 14 additions and 0 deletions

View File

@@ -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"]

View File

@@ -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: