diff --git a/docker-compose.yml b/docker-compose.yml index 42f4104..551fb6f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,7 @@ services: POSTGRES_PASSWORD: postgres volumes: - pgdata:/var/lib/postgresql/data + - pgsocket:/var/run/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s @@ -24,11 +25,13 @@ services: dockerfile: Dockerfile restart: unless-stopped environment: - KMTN_DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/kmountain + KMTN_DATABASE_URL: >- + postgresql+asyncpg://postgres:postgres@/kmountain?host=/var/run/postgresql KMTN_CORS_ORIGINS: '["http://localhost:4200", "http://localhost"]' ports: - "8000:8000" volumes: + - pgsocket:/var/run/postgresql - logs:/logs depends_on: db: @@ -51,4 +54,5 @@ services: volumes: pgdata: + pgsocket: logs: