-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
70 lines (67 loc) · 1.69 KB
/
compose.yaml
File metadata and controls
70 lines (67 loc) · 1.69 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
services:
app:
build:
context: .
dockerfile: infra/app.dockerfile
ports:
- "4000:4000"
restart: unless-stopped
environment:
DB_USER: ${DB_USER:-postgres}
DB_PASSWORD: ${DB_PASSWORD:-postgres}
DB_PORT: 5432
DB_HOST: db
DATABASE_URL: postgres://${DB_USER:-postgres}:${DB_PASSWORD:-postgres}@db:5432/${DB_NAME:-css_clash}
depends_on:
db:
condition: service_healthy
restart: true
gotenberg:
condition: service_healthy
links:
- db
env_file: ".env"
gotenberg:
image: gotenberg/gotenberg:latest
ports:
- "3000:3000"
restart: unless-stopped
command:
- "gotenberg"
- "--chromium-disable-javascript=true"
- "--chromium-auto-start=true"
- "--chromium-allow-insecure-localhost=true"
- "--chromium-ignore-certificate-errors=true"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 60s
retries: 5
start_period: 30s
timeout: 10s
db:
build:
context: .
dockerfile: infra/db.dockerfile
container_name: css_clash_postgres
environment:
- POSTGRES_USER=${DB_USER:-postgres}
- POSTGRES_PASSWORD=${DB_PASSWORD:-postgres}
- PGDATA=${PGDATA:-/var/lib/postgresql/data/pgdata}
- POSTGRES_DB=${DB_NAME:-css_clash}
restart: unless-stopped
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-css_clash}",
]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
volumes:
pgdata: