-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (75 loc) · 2.31 KB
/
docker-compose.yml
File metadata and controls
80 lines (75 loc) · 2.31 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
# Use this docker-compose.yml to run via Coolify
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-bluesky}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-bluesky}
POSTGRES_DB: ${POSTGRES_DB:-bluesky_scheduler}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER:-bluesky} -d ${POSTGRES_DB:-bluesky_scheduler}",
]
interval: 10s
timeout: 5s
retries: 5
api:
build:
context: .
dockerfile: Dockerfile.api
environment:
DATABASE_URL: ${DATABASE_URL:-postgres://bluesky:bluesky@postgres:5432/bluesky_scheduler}
CRON_SECRET: ${CRON_SECRET:-your-secret-here}
depends_on:
- postgres
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
args:
VITE_API_URL: ${VITE_API_URL:-http://api:3000}
VITE_STORAGE_MODE: remote
VITE_METADATA_FETCHER_URL: ${VITE_METADATA_FETCHER_URL:-https://linkpreview.magic.coolify.nico.fyi/api/v1/preview?url=}
VITE_IMAGE_PROXY_URL: ${VITE_IMAGE_PROXY_URL:-https://allorigins.magic.coolify.nico.fyi/raw?url=}
environment:
VITE_API_URL: ${VITE_API_URL:-http://api:3000}
VITE_STORAGE_MODE: remote
VITE_METADATA_FETCHER_URL: ${VITE_METADATA_FETCHER_URL:-https://linkpreview.magic.coolify.nico.fyi/api/v1/preview?url=}
VITE_IMAGE_PROXY_URL: ${VITE_IMAGE_PROXY_URL:-https://allorigins.magic.coolify.nico.fyi/raw?url=}
depends_on:
- api
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
cron:
image: alpine
depends_on:
- api
environment:
CRON_SECRET: ${CRON_SECRET:-your-secret-here}
command: >
/bin/sh -c "
apk add --no-cache curl &&
while true; do
curl -X POST -H 'Authorization: Bearer "$CRON_SECRET"' http://api:3000/api/cron/check-posts;
sleep 60;
done
"
healthcheck:
test: ["CMD", "ps", "aux", "|", "grep", "[c]url"]
interval: 30s
timeout: 10s
retries: 3
volumes:
postgres_data: