-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (77 loc) · 2.81 KB
/
Copy pathdocker-compose.yml
File metadata and controls
80 lines (77 loc) · 2.81 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
# Pinakes ILS — production-ready compose.
# docker compose up -d # pulls the published image
# docker compose up -d --build # builds locally from ./Dockerfile
#
# Copy .env.example -> .env and adjust before first start (at minimum set
# ADMIN_EMAIL/ADMIN_PASSWORD for a fully headless install, and a stable
# PLUGIN_ENCRYPTION_KEY + strong DB passwords for production).
services:
db:
image: mysql:8.0
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS:-rootpinakes}
MYSQL_DATABASE: ${DB_NAME:-pinakes}
MYSQL_USER: ${DB_USER:-pinakes}
MYSQL_PASSWORD: ${DB_PASS:-pinakes}
command: >
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-u", "root", "-p${DB_ROOT_PASS:-rootpinakes}"]
interval: 5s
timeout: 5s
retries: 20
start_period: 30s
app:
# Public Docker Hub image (no auth needed). GHCR alternative:
# ghcr.io/fabiodalez-dev/pinakes-docker:<tag>
image: fabiodalez/pinakes:${PINAKES_TAG:-latest}
build:
context: .
args:
PINAKES_VERSION: ${PINAKES_VERSION:-0.7.22}
restart: unless-stopped
depends_on:
db:
condition: service_healthy
ports:
- "${HTTP_PORT:-8080}:80"
environment:
DB_HOST: db
DB_PORT: 3306
DB_NAME: ${DB_NAME:-pinakes}
DB_USER: ${DB_USER:-pinakes}
DB_PASS: ${DB_PASS:-pinakes}
APP_ENV: ${APP_ENV:-production}
APP_LOCALE: ${APP_LOCALE:-it_IT}
# Timezone for the in-container scheduler (supercronic) so the automatic
# notification/maintenance jobs fire at your library's local hours, not UTC.
TZ: ${TZ:-UTC}
# Set to 1 only if you run the cron scripts from an external scheduler.
PINAKES_CRON_DISABLED: ${PINAKES_CRON_DISABLED:-0}
APP_CANONICAL_URL: ${APP_CANONICAL_URL:-}
APP_DEBUG: ${APP_DEBUG:-false}
DISPLAY_ERRORS: ${DISPLAY_ERRORS:-false}
FORCE_HTTPS: ${FORCE_HTTPS:-false}
SESSION_LIFETIME: ${SESSION_LIFETIME:-3600}
# Set a stable key in .env for production (openssl rand -base64 32).
PLUGIN_ENCRYPTION_KEY: ${PLUGIN_ENCRYPTION_KEY:-}
# Provide both for a fully headless install (no web wizard).
ADMIN_EMAIL: ${ADMIN_EMAIL:-}
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-}
ADMIN_NAME: ${ADMIN_NAME:-Admin}
ADMIN_SURNAME: ${ADMIN_SURNAME:-User}
volumes:
- storage:/var/www/html/storage
- uploads:/var/www/html/public/uploads
# Persist translations: custom/additional locale files added here survive
# image upgrades. The entrypoint re-seeds the shipped files on every boot.
- locale:/var/www/html/locale
volumes:
db_data:
storage:
uploads:
locale: