-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (40 loc) · 1.04 KB
/
docker-compose.yml
File metadata and controls
42 lines (40 loc) · 1.04 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
# Docker Compose for SkillRx Beacon
#
# Usage:
# Development: docker compose up
# Production: docker compose -f docker-compose.yml -f docker-compose.production.yml up -d
#
# Build:
# docker compose build
#
# First-time setup:
# docker compose run --rm web bin/rails db:prepare
# docker compose run --rm web bin/rails data:import_content
services:
web:
build: .
ports:
- "${PORT:-3000}:80"
environment:
- RAILS_ENV=${RAILS_ENV:-production}
- RAILS_MASTER_KEY=${RAILS_MASTER_KEY}
- SOLID_QUEUE_IN_PUMA=1
volumes:
# Persist SQLite databases
- storage:/rails/storage
# Persist ActiveStorage uploads
- uploads:/rails/storage/uploads
# Mount content directory (medical content files)
- ${CONTENT_PATH:-./content}:/rails/content:ro
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/up"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
storage:
driver: local
uploads:
driver: local