-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.prod.postgres-with-server.yml
More file actions
119 lines (116 loc) · 3.82 KB
/
docker-compose.prod.postgres-with-server.yml
File metadata and controls
119 lines (116 loc) · 3.82 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
services:
actual-server:
container_name: actual-server
image: docker.io/actualbudget/actual-server:latest
ports:
- '32770:5006'
environment:
ACTUAL_OPENID_DISCOVERY_URL: ${ACTUAL_OPENID_DISCOVERY_URL}
ACTUAL_OPENID_CLIENT_ID: ${ACTUAL_OPENID_CLIENT_ID}
ACTUAL_OPENID_CLIENT_SECRET: ${ACTUAL_OPENID_CLIENT_SECRET}
ACTUAL_OPENID_SERVER_HOSTNAME: ${ACTUAL_OPENID_SERVER_HOSTNAME}
ACTUAL_OPENID_AUTHORIZATION_ENDPOINT: ${ACTUAL_OPENID_AUTHORIZATION_ENDPOINT}
ACTUAL_OPENID_TOKEN_ENDPOINT: ${ACTUAL_OPENID_TOKEN_ENDPOINT}
ACTUAL_OPENID_USERINFO_ENDPOINT: ${ACTUAL_OPENID_USERINFO_ENDPOINT}
ACTUAL_OPENID_AUTH_METHOD: ${ACTUAL_OPENID_AUTH_METHOD}
ACTUAL_OPENID_ENFORCE: ${ACTUAL_OPENID_ENFORCE}
ACTUAL_ALLOWED_LOGIN_METHODS: ${ACTUAL_ALLOWED_LOGIN_METHODS}
volumes:
- ./actual-data:/data
healthcheck:
test: ['CMD-SHELL', 'node src/scripts/health-check.js']
interval: 60s
timeout: 10s
retries: 3
start_period: 20s
restart: unless-stopped
actual-rest-api:
user: "0:0"
platform: linux/amd64
image: docker.io/zonemix063/actual-rest-api:latest
container_name: actual-rest-api
ports:
- "32771:3000"
volumes:
- ./actual-rest/prod/actual-rest-api:/app/.actual-cache
working_dir: /app
command: npm start
environment:
DB_TYPE: postgres
ACTUAL_SERVER_URL: http://actual-server:5006
ACTUAL_PASSWORD: ${ACTUAL_PASSWORD}
ACTUAL_SYNC_ID: ${ACTUAL_SYNC_ID}
ADMIN_USER: ${ADMIN_USER}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
NODE_ENV: ${NODE_ENV}
PORT: ${ACTUAL_PORT}
JWT_SECRET: ${JWT_SECRET}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET}
JWT_ACCESS_TTL: ${JWT_ACCESS_TTL}
JWT_REFRESH_TTL: ${JWT_REFRESH_TTL}
SESSION_SECRET: ${SESSION_SECRET}
DATA_DIR: ${DATA_DIR}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS}
LOG_LEVEL: ${LOG_LEVEL}
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
REDIS_PASSWORD: ${REDIS_PASSWORD}
ENABLE_CORS: ${ENABLE_CORS}
ENABLE_HELMET: ${ENABLE_HELMET}
ENABLE_RATE_LIMITING: ${ENABLE_RATE_LIMITING}
MAX_REQUEST_SIZE: ${MAX_REQUEST_SIZE}
TRUST_PROXY: ${TRUST_PROXY}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
actual-server:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3000/v2/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
redis:
image: redis:7-alpine
container_name: actual-rest-api-redis
volumes:
- ./actual-rest/prod/redis:/data
command: >
sh -c "if [ -n \"$$REDIS_PASSWORD\" ]; then
redis-server --appendonly yes --requirepass \"$$REDIS_PASSWORD\"
else
redis-server --appendonly yes
fi"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD}
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
start_period: 10s
restart: unless-stopped
postgres:
image: postgres:16-alpine
container_name: actual-rest-api-postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-postgres}
volumes:
- ./actual-rest/prod/postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 3s
retries: 5
start_period: 10s
restart: unless-stopped