-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompose.yml
81 lines (75 loc) · 1.7 KB
/
compose.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
services:
db:
image: postgres:14
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=appdb
- PGDATA=/var/lib/postgresql/data/pgdata
ports:
- 5432:5432
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 2s
timeout: 2s
retries: 60
volumes:
- postgres:/var/lib/postgresql/data
maildev:
image: maildev/maildev
ports:
- "1080:1080"
healthcheck:
test: [ "CMD", "touch", "health" ]
interval: 15s
timeout: 5s
retries: 5
auth:
image: accent/grpc-service-auth:latest
environment:
DB_DNS: postgresql://postgres:password@db:5432/appdb
depends_on:
db:
condition: service_healthy
command:
- -bearer-duration=8h
email:
image: accent/grpc-service-email:latest
environment:
SMTP_HOST: maildev
SMTP_PORT: 1025
depends_on:
maildev:
condition: service_healthy
app:
build:
context: .
args:
ENVIRONMENT: dev
environment:
DATABASE_URL: postgresql+asyncpg://postgres:password@db:5432/appdb
TEST_DATABASE_URL: postgresql+asyncpg://postgres:password@db:5432/appdb_test
EMAIL_FROM_ADDRESS: no-reply@example.com
depends_on:
auth:
condition: service_healthy
email:
condition: service_healthy
db:
condition: service_healthy
command:
- "/app/start.sh"
- "--reload"
ports:
- "80:80"
develop:
watch:
- action: sync
path: .
target: /app
ignore:
- .venv/
- action: rebuild
path: ./pyproject.toml
volumes:
postgres: