-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
130 lines (122 loc) · 2.92 KB
/
docker-compose.yaml
File metadata and controls
130 lines (122 loc) · 2.92 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
volumes:
fairdrop-postgres:
fairdrop-redis:
fairdrop-s3:
fairdrop-app:
fairdrop-gateway:
fairdrop-prometheus:
fairdrop-grafana:
services:
postgres:
image: postgres:15-alpine
container_name: ${DB_HOST}
command: postgres -c max_connections=300 # switch to pgbouncer available
healthcheck:
test: ['CMD', 'pg_isready', '-d', '${POSTGRES_DB}', '-U', '${POSTGRES_USER}']
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
env_file: .env
ports:
- '${DB_PORT}:5432'
volumes:
- fairdrop-postgres:/var/lib/postgresql/data
redis:
image: redis/redis-stack-server:latest
container_name: ${REDIS_HOST}
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
env_file: .env
ports:
- '${REDIS_PORT}:6379'
volumes:
- fairdrop-redis:/data
s3:
image: minio/minio:latest
container_name: ${S3_HOST}
command: server /data --console-address ':9001'
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
env_file: .env
ports:
- '${S3_PORT}:9000'
volumes:
- fairdrop-s3:/data
app:
read_only: true
tmpfs:
- /tmp
build: .
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
s3:
condition: service_healthy
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8000/health']
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
ports:
- '${APP_PORT}:8000'
volumes:
- fairdrop-app:/data
worker:
build: .
command: /app/.venv/bin/arq app.worker.WorkerSettings
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
env_file: .env
volumes:
- fairdrop-app:/data
gateway:
image: nginx:alpine
container_name: ${GATEWAY_HOST}
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:80/health']
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
env_file: .env
depends_on:
app:
condition: service_healthy
ports:
- '${GATEWAY_PORT}:80'
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
prometheus:
image: prom/prometheus:latest
container_name: ${PROMETHEUS_HOST}
ports:
- '${PROMETHEUS_PORT}:9090'
volumes:
- ./infrastructure/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml:ro
- fairdrop-prometheus:/prometheus
depends_on:
- app
grafana:
image: grafana/grafana:latest
container_name: ${GRAFANA_HOST}
ports:
- '${GRAFANA_PORT}:3000'
volumes:
- fairdrop-grafana:/var/lib/grafana
depends_on:
- prometheus