52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
services:
|
|
db:
|
|
image: mariadb:10.11
|
|
container_name: ep-piwigo-db
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS}
|
|
MYSQL_DATABASE: ${DB_NAME:-piwigo}
|
|
MYSQL_USER: ${DB_USER:-piwigo}
|
|
MYSQL_PASSWORD: ${DB_PASS}
|
|
volumes:
|
|
- db-data:/var/lib/mysql
|
|
networks:
|
|
- piwigo-net
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_ROOT_PASS}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
piwigo:
|
|
build: .
|
|
container_name: ep-piwigo
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
DB_HOST: db
|
|
DB_PORT: 3306
|
|
DB_NAME: ${DB_NAME:-piwigo}
|
|
DB_USER: ${DB_USER:-piwigo}
|
|
DB_PASS: ${DB_PASS}
|
|
PHP_MEMORY_LIMIT: 512M
|
|
PHP_MAX_EXECUTION_TIME: 300
|
|
PHP_UPLOAD_MAX_FILESIZE: 100M
|
|
PHP_POST_MAX_SIZE: 100M
|
|
volumes:
|
|
- ${PIWIGO_DATA_DIR:-./piwigo-data}:/var/www/html
|
|
# Ensure data directory exists with correct permissions
|
|
# Run: mkdir -p ./piwigo-data && chown -R 33:33 ./piwigo-data
|
|
ports:
|
|
- "${PIWIGO_PORT:-8080}:80"
|
|
networks:
|
|
- piwigo-net
|
|
|
|
volumes:
|
|
db-data:
|
|
|
|
networks:
|
|
piwigo-net:
|
|
driver: bridge |