-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
112 lines (107 loc) · 2.91 KB
/
Copy pathcompose.yaml
File metadata and controls
112 lines (107 loc) · 2.91 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
services:
postgres:
image: postgres:18.3-bookworm
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
healthcheck:
test:
["CMD-SHELL", 'pg_isready -U "$${POSTGRES_USER}" -d "$${POSTGRES_DB}"']
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
volumes:
- postgres-data:/var/lib/postgresql
api-migrate:
build:
context: .
dockerfile: ./apps/api/Dockerfile
command: ["pnpm", "db:deploy"]
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
restart: "no"
api:
build:
context: .
dockerfile: ./apps/api/Dockerfile
depends_on:
postgres:
condition: service_healthy
api-migrate:
condition: service_completed_successfully
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
FEED_AUTO_REFRESH_INTERVAL_HOURS: ${FEED_AUTO_REFRESH_INTERVAL_HOURS}
FEED_MAX_ARTICLES_PER_FEED: ${FEED_MAX_ARTICLES_PER_FEED}
FEED_OPML_PATH: /run/rssift/feeds.opml
INGEST_ON_BOOT: ${INGEST_ON_BOOT}
LLM_API_KEY: ${LLM_API_KEY}
LLM_BASE_URL: ${LLM_BASE_URL}
LLM_MODEL: ${LLM_MODEL}
LLM_SUMMARY_CONCURRENCY: ${LLM_SUMMARY_CONCURRENCY}
LLM_SUMMARY_LANGUAGE: ${LLM_SUMMARY_LANGUAGE}
LLM_TIMEOUT_MS: ${LLM_TIMEOUT_MS}
PORT: 3000
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3000/health/ready').then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1))",
]
interval: 5s
timeout: 5s
retries: 20
start_period: 20s
restart: unless-stopped
volumes:
- type: bind
source: ${FEED_OPML_HOST_PATH}
target: /run/rssift/feeds.opml
read_only: true
web:
build:
context: .
dockerfile: ./apps/web/Dockerfile
depends_on:
api:
condition: service_healthy
environment:
API_BASE_URL: http://api:3000
PORT: 3001
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3001/api/health').then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1))",
]
interval: 5s
timeout: 5s
retries: 20
start_period: 20s
restart: unless-stopped
caddy:
image: caddy:2.11.2-alpine
depends_on:
web:
condition: service_healthy
ports:
- "${HTTP_PORT:-80}:80"
restart: unless-stopped
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data
- caddy-config:/config
volumes:
caddy-config:
caddy-data:
postgres-data: