-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
93 lines (88 loc) · 2.55 KB
/
compose.yml
File metadata and controls
93 lines (88 loc) · 2.55 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
services:
backend:
build:
context: .
dockerfile: ./apps/backend/Dockerfile
environment:
- DATABASE_URL=${DATABASE_URL:?}
- FIREFLY_TOKEN=${FIREFLY_TOKEN:?}
- FIREFLY_API_URL=${FIREFLY_API_URL:?}
depends_on:
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
restart: unless-stopped
healthcheck:
test: ['CMD', 'curl', '-f', 'http://0.0.0.0:3000/series']
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
erpns:
build:
context: .
dockerfile: ./apps/erpns/Dockerfile
depends_on:
backend:
condition: service_started
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.middlewares.redirect-www-to-non-www.redirectregex.regex=^(http|https)://www\.(.+)
- traefik.http.middlewares.redirect-www-to-non-www.redirectregex.replacement=${1}://${2}
- traefik.http.middlewares.redirect-www-to-non-www.redirectregex.permanent=true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:5173']
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
db:
image: postgres:18
environment:
- POSTGRES_USER=${POSTGRES_USER:?}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?}
- POSTGRES_DB=${POSTGRES_DB:?}
volumes:
- postgres_data:/var/lib/postgresql/18/data
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}']
interval: 5s
timeout: 5s
retries: 5
migrate:
build:
context: .
dockerfile: ./apps/backend/Dockerfile
target: install
environment:
- DATABASE_URL=${DATABASE_URL:?}
depends_on:
db:
condition: service_healthy
restart: no
working_dir: /app/apps/backend
command: bunx --bun drizzle-kit migrate
exclude_from_hc: true
website:
build:
context: .
dockerfile: ./apps/website/Dockerfile
depends_on:
backend:
condition: service_started
labels:
- traefik.enable=true
- traefik.http.middlewares.redirect-www-to-non-www.redirectregex.regex=^(http|https)://www\.(.+)
- traefik.http.middlewares.redirect-www-to-non-www.redirectregex.replacement=${1}://${2}
- traefik.http.middlewares.redirect-www-to-non-www.redirectregex.permanent=true
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:4321']
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
volumes:
postgres_data: