-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.production.yml
More file actions
46 lines (45 loc) · 1.08 KB
/
docker-compose.production.yml
File metadata and controls
46 lines (45 loc) · 1.08 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
services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "${PORT:-3000}:80"
environment:
RAILS_ENV: production
RAILS_MASTER_KEY: ${RAILS_MASTER_KEY}
RAILS_LOG_TO_STDOUT: "1"
RAILS_SERVE_STATIC_FILES: "1"
SOLID_QUEUE_IN_PUMA: "1"
DOCKER_CONTAINER: "true"
volumes:
# Persist SQLite databases
- storage:/app/storage
# Persist ActiveStorage uploads
- uploads:/app/storage/uploads
# Mount content directory (medical content files)
- ${CONTENT_PATH:-./content}:/app/content:ro
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/up"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
deploy:
resources:
limits:
# Suitable for Raspberry Pi or mini computers
memory: 512M
reservations:
memory: 256M
volumes:
storage:
driver: local
uploads:
driver: local