Updates primary compose to use sockets database access
This commit is contained in:
+5
-1
@@ -10,6 +10,7 @@ services:
|
|||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
volumes:
|
volumes:
|
||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
|
- pgsocket:/var/run/postgresql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
@@ -24,11 +25,13 @@ services:
|
|||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
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"]'
|
KMTN_CORS_ORIGINS: '["http://localhost:4200", "http://localhost"]'
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
volumes:
|
volumes:
|
||||||
|
- pgsocket:/var/run/postgresql
|
||||||
- logs:/logs
|
- logs:/logs
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
@@ -51,4 +54,5 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
pgsocket:
|
||||||
logs:
|
logs:
|
||||||
|
|||||||
Reference in New Issue
Block a user