-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dokploy.yml
More file actions
104 lines (98 loc) · 2.52 KB
/
Copy pathdocker-compose.dokploy.yml
File metadata and controls
104 lines (98 loc) · 2.52 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
services:
postgres:
image: postgres:16-alpine
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=factpilot
- POSTGRES_USER=factpilot
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U factpilot"]
interval: 5s
timeout: 5s
retries: 5
backend:
build: .
restart: always
env_file:
- .env
environment:
- DATABASE_URL=postgresql://factpilot:${POSTGRES_PASSWORD}@postgres:5432/factpilot
- PYTHONPATH=/app
- FRONTEND_URL=https://factpilot.fr
- CORS_ORIGINS=https://factpilot.fr
- GOOGLE_REDIRECT_URI=https://factpilot.fr/api/auth/google/callback
- LINKEDIN_REDIRECT_URI=https://factpilot.fr/api/auth/linkedin/callback
volumes:
- app-data:/app/data
depends_on:
postgres:
condition: service_healthy
scheduler:
build: .
restart: always
command: python -m src.scheduler.main
env_file:
- .env
environment:
- DATABASE_URL=postgresql://factpilot:${POSTGRES_PASSWORD}@postgres:5432/factpilot
- PYTHONPATH=/app
volumes:
- app-data:/app/data
depends_on:
postgres:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
shm_size: "1g"
args:
- NEXT_PUBLIC_API_URL=/api
- NEXT_PUBLIC_SITE_URL=https://factpilot.fr
restart: always
environment:
- BACKEND_URL=http://backend:8000
- NODE_ENV=production
expose:
- "3000"
networks:
- dokploy-network
- default
labels:
- "traefik.enable=true"
- "traefik.http.routers.factpilot-frontend.rule=Host(`factpilot.fr`)"
- "traefik.http.routers.factpilot-frontend.entrypoints=websecure"
- "traefik.http.routers.factpilot-frontend.tls.certResolver=letsencrypt"
- "traefik.http.services.factpilot-frontend.loadbalancer.server.port=3000"
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 512M
depends_on:
- backend
backup:
build: .
restart: always
command: >
sh -c "while true; do
echo '[backup] Running daily backup...';
sleep 86400;
done"
environment:
- DATA_DIR=/app/data
- BACKUP_DIR=/app/backups
volumes:
- app-data:/app/data
- backup-data:/app/backups
volumes:
app-data:
backup-data:
postgres-data:
networks:
dokploy-network:
external: true