-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (56 loc) · 1.42 KB
/
docker-compose.yml
File metadata and controls
60 lines (56 loc) · 1.42 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
version: '3.8'
services:
backend:
build:
context: .
dockerfile: Dockerfile.backend
container_name: gradent-backend
ports:
- "8000:8000"
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
# Only set OPENAI_BASE_URL if defined (don't set to empty string)
# - OPENAI_BASE_URL=${OPENAI_BASE_URL}
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL:-}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID:-}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET:-}
- SUGGESTION_POLL_SECONDS=${SUGGESTION_POLL_SECONDS:-30}
volumes:
- ./data:/app/data
- ./logs:/app/logs
- ./uploads:/app/uploads
- ./credentials.json:/app/credentials.json:ro
restart: unless-stopped
networks:
- gradent-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
container_name: gradent-frontend
ports:
- "80:80"
depends_on:
- backend
restart: unless-stopped
networks:
- gradent-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
gradent-network:
driver: bridge
volumes:
data:
logs:
uploads: