99 lines
2.3 KiB
YAML
99 lines
2.3 KiB
YAML
services:
|
|
mysql:
|
|
image: mariadb:${MARIA_DB_VERSION}
|
|
container_name: mysql_piler
|
|
restart: unless-stopped
|
|
networks:
|
|
- pilernet
|
|
cap_drop:
|
|
- ALL
|
|
cap_add:
|
|
- dac_override
|
|
- setuid
|
|
- setgid
|
|
environment:
|
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
|
- MYSQL_USER=${MYSQL_USER}
|
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
|
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
|
- TZ="Europe/Berlin"
|
|
- MARIADB_AUTO_UPGRADE=1
|
|
- MARIADB_DISABLE_UPGRADE_BACKUP=1
|
|
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
|
healthcheck:
|
|
test: mysql --user=${MYSQL_USER} --password=${MYSQL_PASSWORD} piler --execute "show tables"
|
|
interval: "60s"
|
|
timeout: "5s"
|
|
start_period: "15s"
|
|
retries: 3
|
|
volumes:
|
|
- db_data:/var/lib/mysql
|
|
|
|
memcached:
|
|
image: memcached:latest
|
|
container_name: memcached_piler
|
|
restart: unless-stopped
|
|
networks:
|
|
- pilernet
|
|
cap_drop:
|
|
- ALL
|
|
command: -m 64
|
|
|
|
piler:
|
|
image: simatec/piler:${PILER_VERSION}
|
|
container_name: piler
|
|
restart: unless-stopped
|
|
networks:
|
|
- pilernet
|
|
hostname: ${PILER_DOMAIN}
|
|
init: true
|
|
environment:
|
|
- MEMCACHED_HOSTNAME=memcached
|
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
|
- MYSQL_USER=${MYSQL_USER}
|
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
|
- MYSQL_HOSTNAME=mysql_piler
|
|
- PILER_HOSTNAME=${PILER_DOMAIN}
|
|
- MEMCACHED_HOST=memcached_piler
|
|
- TZ=${TIME_ZONE}
|
|
- RT=1
|
|
ports:
|
|
- "25:25"
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- piler_etc:/etc/piler
|
|
- piler_var_store:/var/piler/store
|
|
- piler_var_manticore:/var/piler/manticore
|
|
- piler_var_imap:/var/piler/imap
|
|
- piler_var_stat:/var/piler/stat
|
|
- piler_cron:/var/spool/cron/crontabs
|
|
- /etc/localtime:/etc/localtime:ro
|
|
healthcheck:
|
|
test: curl -s smtp://localhost/
|
|
interval: "60s"
|
|
timeout: "3s"
|
|
start_period: "15s"
|
|
retries: 3
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
memory: 512M
|
|
limits:
|
|
memory: 512M
|
|
depends_on:
|
|
- memcached
|
|
- mysql
|
|
|
|
networks:
|
|
pilernet:
|
|
external: true
|
|
|
|
volumes:
|
|
db_data:
|
|
piler_etc:
|
|
piler_var_store:
|
|
piler_var_manticore:
|
|
piler_var_imap:
|
|
piler_var_stat:
|
|
piler_cron:
|