mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2024-12-22 08:44:28 +01:00
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
services:
|
|
# Wordpress
|
|
wordpress:
|
|
image: wordpress:fpm
|
|
container_name: wordpress
|
|
profiles:
|
|
- wordpress
|
|
restart: on-failure:5
|
|
depends_on:
|
|
- wordpress_db
|
|
- caddy
|
|
env_file:
|
|
- env/wordpress.env
|
|
volumes:
|
|
- ./config/wordpress/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro
|
|
- wordpress:/var/www/html:rw
|
|
networks:
|
|
- infra-network
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
|
|
# Database wordpress
|
|
wordpress_db:
|
|
image: mariadb:latest
|
|
container_name: wordpress_db
|
|
profiles:
|
|
- database
|
|
- wordpress
|
|
depends_on:
|
|
- caddy
|
|
restart: on-failure:5
|
|
volumes:
|
|
- wordpress_db:/var/lib/mysql:rw
|
|
env_file:
|
|
- env/wordpress_db.env
|
|
command: '--default-authentication-plugin=mysql_native_password'
|
|
networks:
|
|
- infra-network
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
|
|
wordpress_backup:
|
|
image: mazzolino/restic:latest
|
|
container_name: wordpress_backup
|
|
profiles:
|
|
- wordpress
|
|
restart: on-failure:5
|
|
env_file:
|
|
- env/backup.env
|
|
volumes:
|
|
- wordpress_backup:/mnt/restic
|
|
- wordpress_db:/data/wordpress_db:ro
|
|
- wordpress:/data/wordpress:ro
|
|
networks:
|
|
- infra-network
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
|
|
volumes:
|
|
wordpress_db:
|
|
name: wordpress_db
|
|
wordpress:
|
|
name: wordpress
|
|
wordpress_backup:
|
|
name: wordpress_backup |