From ca31498cecb6d8bf6bb55fe3abed624e46396a8c Mon Sep 17 00:00:00 2001 From: tylen Date: Tue, 5 May 2026 12:11:41 +0300 Subject: [PATCH] expose port and add networks --- backend/Dockerfile | 2 ++ docker-compose.yaml | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/backend/Dockerfile b/backend/Dockerfile index 841877e..57bee5c 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -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"] diff --git a/docker-compose.yaml b/docker-compose.yaml index 328ad35..555b7d7 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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: