You've already forked isop-mirror
86 lines
2.1 KiB
YAML
86 lines
2.1 KiB
YAML
services:
|
|
node:
|
|
container_name: node
|
|
build:
|
|
context: ../frontend
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
depends_on:
|
|
php-fpm:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost"]
|
|
start_period: 10s
|
|
interval: 1m
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# Caddy webserver
|
|
caddy:
|
|
container_name: caddy
|
|
image: caddy:2.10.0-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- 80:80 # Needed for HTTP->HTTPS redirection
|
|
- 443:443
|
|
- 443:443/udp
|
|
volumes:
|
|
# Caddy routes files (read-only)
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
|
|
# Caddy certificates and other temporary data
|
|
- ./caddy-data:/data
|
|
|
|
# Caddy configuration
|
|
- ./caddy-config:/config
|
|
depends_on:
|
|
- php-fpm
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:2019/metrics"]
|
|
start_period: 10s
|
|
interval: 1m
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# Custom PHP container
|
|
php-fpm:
|
|
container_name: php-fpm
|
|
user: 'www-data:www-data'
|
|
build:
|
|
context: ../backend
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ../backend/.env
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "pgrep", "-x", "php-fpm"]
|
|
start_period: 10s
|
|
interval: 1m
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# MariaDB database
|
|
# No ports are open, only Shopware itself has access
|
|
database:
|
|
container_name: mariadb
|
|
image: mariadb:11.8.2-noble
|
|
restart: unless-stopped
|
|
cap_add:
|
|
# Allow memory binding
|
|
- SYS_NICE
|
|
environment:
|
|
# Change these if needed
|
|
MARIADB_DATABASE: "isop"
|
|
MARIADB_ROOT_PASSWORD: "admin"
|
|
volumes:
|
|
# Database data
|
|
- ./mariadb_data:/var/lib/mysql
|
|
healthcheck:
|
|
test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
|
|
start_period: 10s
|
|
interval: 1m
|
|
timeout: 5s
|
|
retries: 3 |