-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
60 lines (51 loc) · 1.3 KB
/
docker-compose.yaml
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
version: '3.8'
services:
db:
image: postgres:15
restart: unless-stopped
environment:
POSTGRES_USER: $POSTGRES_USER
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
POSTGRES_DB: $POSTGRES_DB
ports:
- 5432:5432
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: [CMD-SHELL, pg_isready -U $POSTGRES_USER -d $POSTGRES_DB]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:latest
restart: unless-stopped
backend:
build:
context: .
dockerfile: docker/backend/backend.dockerfile
restart: unless-stopped
environment:
APP_HTTP_HOST: 0.0.0.0
APP_HTTP_PORT: 8000
APP_DB_PG_DSN: postgresql+asyncpg://$POSTGRES_USER:$POSTGRES_PASSWORD@db:5432/$POSTGRES_DB
APP_REDIS_REDIS_DSN: redis://redis:6379
APP_SECURITY_SECRET: $APP_SECURITY_SECRET
APP_SECURITY_PRIVATE_KEY: $APP_SECURITY_PRIVATE_KEY
APP_TELEGRAM_BOT_TOKEN: $APP_TELEGRAM_BOT_TOKEN
APP_LOG_LEVEL: info
APP_LOG_FORMAT: json
depends_on:
db:
condition: service_healthy
frontend:
build:
context: .
dockerfile: docker/frontend/frontend.dockerfile
restart: unless-stopped
ports:
- 80:80
- 443:443
depends_on:
- backend
volumes:
db-data: