-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (44 loc) · 1.07 KB
/
docker-compose.yml
File metadata and controls
45 lines (44 loc) · 1.07 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
services:
db:
image: postgres:16.8-alpine3.20
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] # ["CMD-SHELL", "pg_isready -U dbuser"]
interval: 5s
timeout: 5s
retries: 5
app:
build: .
ports:
- "8000:8000"
environment:
ENVIRONMENT: ${ENVIRONMENT}
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USER: ${DB_USER}
DB_PASS: ${DB_PASS}
DB_NAME: ${DB_NAME}
JWT_KEY: ${JWT_KEY}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
NEON_CONNSTR: ${NEON_CONNSTR}
ALLOWED_ORIGIN: ${ALLOWED_ORIGIN}
PORT: ${PORT}
MONITOR_KEY: ${MONITOR_KEY}
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
redis:
image: redis:7.4-alpine
ports:
- "6379:6379"
volumes:
db_data: