-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
64 lines (61 loc) · 2.33 KB
/
Copy pathdocker-compose.yml
File metadata and controls
64 lines (61 loc) · 2.33 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
# Scriptor 2.0 demo stack.
#
# Two services:
# scriptor — php:8.3-fpm-alpine + iManager 2.0; runs the entrypoint
# that bootstraps a fresh demo database on first start.
# web — nginx:alpine + the public/ webroot baked in; fronts
# scriptor on http://localhost:8080 and forwards .php to
# scriptor's fastcgi.
#
# Volume strategy: code lives in the IMAGES (rebuilt on every
# `docker compose up -d --build`); only mutable state is in named
# volumes:
# scriptor-data → /var/www/scriptor/data (SQLite, cache,
# logs, settings)
# scriptor-uploads → /var/www/scriptor/public/uploads (FileStorage)
#
# This means `git pull && docker compose up -d --build` propagates
# code changes; the DB and uploads survive container recreation.
# `docker compose down -v` still resets the demo to factory-fresh.
services:
scriptor:
build:
context: .
dockerfile: docker/Dockerfile
image: bigins/scriptor-demo:latest
container_name: scriptor-demo
restart: unless-stopped
environment:
# Admin password for the seeded `admin` user. Default value matches
# docs/demo.md. Override via host env var for a private demo:
# SCRIPTOR_ADMIN_PASSWORD=<your-secret> docker compose up -d --build
SCRIPTOR_ADMIN_PASSWORD: "${SCRIPTOR_ADMIN_PASSWORD:-gT5nLazzyBob}"
volumes:
- scriptor-data:/var/www/scriptor/data
- scriptor-uploads:/var/www/scriptor/public/uploads
healthcheck:
test: ["CMD-SHELL", "php -r \"exit(file_exists('/var/www/scriptor/data/imanager.db') ? 0 : 1);\""]
interval: 5s
timeout: 3s
retries: 24
start_period: 30s
web:
build:
context: .
dockerfile: docker/Dockerfile.web
image: bigins/scriptor-demo-web:latest
container_name: scriptor-demo-web
restart: unless-stopped
depends_on:
scriptor:
condition: service_healthy
ports:
# Host port can be overridden — e.g. `SCRIPTOR_DEMO_PORT=8090 docker compose up`
# — when 8080 is already taken on the host (ServBay, another container, …).
- "${SCRIPTOR_DEMO_PORT:-8080}:80"
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
- scriptor-uploads:/var/www/scriptor/public/uploads:ro
volumes:
scriptor-data:
scriptor-uploads: