-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (76 loc) · 2.02 KB
/
docker-compose.yml
File metadata and controls
80 lines (76 loc) · 2.02 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
version: "3.9"
services:
db:
image: mysql:8.0
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-rootpassword}
- MYSQL_DATABASE=${MYSQL_DATABASE:-docgen}
- MYSQL_USER=${MYSQL_USER:-docgen}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-docgenpassword}
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD:-rootpassword}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
phpmyadmin:
image: phpmyadmin:latest
restart: unless-stopped
environment:
- PMA_HOST=db
- PMA_PORT=3306
- PMA_ARBITRARY=0
ports:
- "8080:80"
depends_on:
db:
condition: service_healthy
api:
build: .
restart: unless-stopped
environment:
- DATABASE_URL=mysql+aiomysql://${MYSQL_USER:-docgen}:${MYSQL_PASSWORD:-docgenpassword}@db:3306/${MYSQL_DATABASE:-docgen}
- OLLAMA_API_KEY=${OLLAMA_API_KEY:-}
- AI_ENABLED=${AI_ENABLED:-true}
- MAX_CONCURRENT_RENDERS=${MAX_CONCURRENT_RENDERS:-10}
- RENDER_TIMEOUT_SECONDS=60
- DEBUG=${DEBUG:-false}
volumes:
- ./app:/app/app
- ./storage:/app/storage
ports:
- "8000:8000" # Direct access (dev)
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
# onlyoffice:
# image: onlyoffice/documentserver
# container_name: onlyoffice
# restart: always
# ports:
# - "8080:80"
# environment:
# - JWT_ENABLED=true
# - JWT_SECRET=supersecret
nginx:
image: nginx:alpine
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- api
profiles:
- production # docker compose --profile production up
volumes:
mysql_data: