From 87410249a534e9d5653cbdc7615bd480758d43e9 Mon Sep 17 00:00:00 2001 From: Artem Bulgakov Date: Sat, 24 Feb 2024 21:29:13 +0300 Subject: [PATCH] deploy: expose ports in development --- docker-compose.prod.yaml | 4 ++++ docker-compose.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docker-compose.prod.yaml b/docker-compose.prod.yaml index 00e2e5b..997d522 100644 --- a/docker-compose.prod.yaml +++ b/docker-compose.prod.yaml @@ -12,3 +12,7 @@ services: # Pull the image from GitHub Container Registry instead of building locally image: "ghcr.io/one-zero-eight/innohassle-musicroom:main" build: !reset null + ports: !reset [] # Do not expose any ports + + db: + ports: !reset [] # Do not expose any ports diff --git a/docker-compose.yaml b/docker-compose.yaml index 26064c6..1cb4c33 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -14,6 +14,8 @@ services: # Wait for the database to be ready before starting the application condition: service_healthy restart: always + ports: + - "8000:8000" volumes: - "./settings.yaml:/code/settings.yaml:ro" # Read-only settings file env_file: .env # You can specify some Uvicorn settings in .env file @@ -31,6 +33,8 @@ services: command: postgres -c synchronous_commit=off volumes: - "postgres:/var/lib/postgresql/data" + ports: + - "5432:5432" env_file: .env # Set POSTGRES_PASSWORD in .env file healthcheck: test: [ "CMD-SHELL", "pg_isready -U postgres" ]