-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (59 loc) · 1.57 KB
/
Copy pathdocker-compose.yml
File metadata and controls
63 lines (59 loc) · 1.57 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
services:
frontend:
build:
context: ./frontend
args:
- TIMEZONE=${TIMEZONE:-UTC}
ports:
- "80:80"
depends_on:
- api
restart: unless-stopped
api:
build: ./api
environment:
DATABASE_URL: postgresql://rootly:${POSTGRES_PASSWORD}@postgres:5432/rootly
REDIS_URL: redis://redis:6379
JWT_SECRET: ${JWT_SECRET}
ACCESS_TOKEN_EXPIRE_MINUTES: ${ACCESS_TOKEN_EXPIRE_MINUTES:-60}
REFRESH_TOKEN_EXPIRE_DAYS: ${REFRESH_TOKEN_EXPIRE_DAYS:-7}
CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost}
PRODUCTION: ${PRODUCTION:-false}
TIMEZONE: ${TIMEZONE:-UTC}
TZ: ${TIMEZONE:-UTC}
PLANTBOOK_CLIENT_ID: ${PLANTBOOK_CLIENT_ID:-}
PLANTBOOK_CLIENT_SECRET: ${PLANTBOOK_CLIENT_SECRET:-}
PLANTBOOK_API_KEY: ${PLANTBOOK_API_KEY:-}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: rootly
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: rootly
TZ: ${TIMEZONE:-UTC}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rootly"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres_data:
redis_data: