-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
39 lines (37 loc) · 976 Bytes
/
docker-compose.yaml
File metadata and controls
39 lines (37 loc) · 976 Bytes
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
services:
db:
build:
context: .
dockerfile: Dockerfile.postgres
container_name: itk_test_api_db
env_file: .env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- pgdata:/var/lib/postgresql/data
- ./init:/docker-entrypoint-initdb.d
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 1.5s
timeout: 6s
retries: 4
api:
build: .
image: wallet-service:latest
restart: unless-stopped
depends_on:
db:
condition: service_healthy
env_file: .env
environment:
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
RUN_MIGRATIONS: ${RUN_MIGRATIONS}
PYTHONPATH: /ws
ports:
- "8000:8000"
volumes:
pgdata: