-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
43 lines (40 loc) · 1.02 KB
/
docker-compose.yaml
File metadata and controls
43 lines (40 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
volumes:
auth_postgres_volume:
services:
auth_pg:
image: postgres:14-alpine3.17
env_file:
- "auth.env"
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- auth_postgres_volume:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB"]
interval: 5s
timeout: 3s
retries: 5
auth_migrator:
build:
context: .
dockerfile: migration.Dockerfile
restart: on-failure
environment:
DB_HOST: auth_pg
auth_server:
build:
context: .
dockerfile: Dockerfile
env_file:
- "auth.env"
environment:
- PG_DSN=${PG_DSN}
# DB_HOST: auth_pg
# - DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@auth_pg:5432/${POSTGRES_DB}?sslmode=disable
depends_on:
auth_pg:
condition: service_healthy # Ждём, пока Postgres будет готов
ports:
- "${GRPC_PORT}:${GRPC_PORT}"
restart: unless-stopped