2023-11-25 17:34:59 +01:00
|
|
|
version: '3.9'
|
2023-04-10 23:42:21 +02:00
|
|
|
services:
|
2023-11-25 17:34:59 +01:00
|
|
|
# Database
|
2023-04-10 23:42:21 +02:00
|
|
|
database:
|
|
|
|
image: mariadb:latest
|
|
|
|
container_name: database
|
|
|
|
profiles:
|
|
|
|
- database
|
2023-11-26 22:46:58 +01:00
|
|
|
depends_on:
|
|
|
|
- caddy
|
2023-11-25 17:34:59 +01:00
|
|
|
restart: on-failure
|
2023-04-10 23:42:21 +02:00
|
|
|
volumes:
|
|
|
|
- database:/var/lib/mysql:rw
|
|
|
|
env_file:
|
|
|
|
- env/mariadb.env
|
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: blog_wp
|
|
|
|
command: '--default-authentication-plugin=mysql_native_password'
|
|
|
|
networks:
|
|
|
|
- blog-network
|
2023-11-25 17:34:59 +01:00
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
|
|
|
|
2023-04-10 23:42:21 +02:00
|
|
|
# Wordpress
|
|
|
|
wordpress:
|
2023-11-25 10:03:44 +01:00
|
|
|
image: wordpress:fpm
|
2023-04-10 23:42:21 +02:00
|
|
|
container_name: wordpress
|
|
|
|
profiles:
|
|
|
|
- wordpress
|
2023-11-25 17:34:59 +01:00
|
|
|
restart: on-failure
|
|
|
|
depends_on:
|
|
|
|
- database
|
2023-11-26 22:46:58 +01:00
|
|
|
- caddy
|
2023-04-10 23:42:21 +02:00
|
|
|
env_file:
|
|
|
|
- env/wordpress.env
|
|
|
|
volumes:
|
2023-12-13 23:29:39 +01:00
|
|
|
- ./config/wordpress/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro
|
2023-04-10 23:42:21 +02:00
|
|
|
- wordpress:/var/www/html:rw
|
|
|
|
networks:
|
|
|
|
- blog-network
|
2023-11-25 17:34:59 +01:00
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
|
|
|
|
2023-04-10 23:42:21 +02:00
|
|
|
# Webserver
|
|
|
|
caddy:
|
2023-12-09 14:50:52 +01:00
|
|
|
image: caddy:latest
|
2023-04-10 23:42:21 +02:00
|
|
|
container_name: webserver
|
|
|
|
profiles:
|
|
|
|
- webserver
|
2023-11-25 17:34:59 +01:00
|
|
|
restart: on-failure
|
2023-04-10 23:42:21 +02:00
|
|
|
ports:
|
2023-11-25 17:34:59 +01:00
|
|
|
- 80:80
|
|
|
|
- 443:443
|
2023-04-10 23:42:21 +02:00
|
|
|
volumes:
|
|
|
|
- wordpress:/var/www/html:rw
|
|
|
|
- caddy_data:/data:rw
|
|
|
|
- caddy_config:/config:rw
|
2023-04-11 23:32:02 +02:00
|
|
|
- ./caddy:/etc/caddy:ro
|
2023-04-10 23:42:21 +02:00
|
|
|
networks:
|
|
|
|
- blog-network
|
2023-11-25 17:34:59 +01:00
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
2023-12-13 23:29:39 +01:00
|
|
|
# cap_drop:
|
|
|
|
# - ALL
|
|
|
|
# cap_add:
|
|
|
|
# - CHOWN
|
|
|
|
# - FOWNER
|
|
|
|
# - DAC_OVERRIDE
|
|
|
|
# - SETGID
|
|
|
|
# - SETUID
|
|
|
|
# - NET_BIND_SERVICE
|
2023-11-25 17:34:59 +01:00
|
|
|
|
|
|
|
# Adminer
|
2023-11-25 10:03:44 +01:00
|
|
|
adminer:
|
|
|
|
image: adminer:latest
|
|
|
|
container_name: adminer
|
|
|
|
profiles:
|
|
|
|
- adminer
|
2023-11-25 17:34:59 +01:00
|
|
|
restart: on-failure
|
2023-11-25 10:03:44 +01:00
|
|
|
env_file:
|
|
|
|
- env/adminer.env
|
|
|
|
depends_on:
|
|
|
|
- database
|
2023-11-26 22:46:58 +01:00
|
|
|
- caddy
|
2023-11-25 10:03:44 +01:00
|
|
|
networks:
|
|
|
|
- blog-network
|
2023-11-25 17:34:59 +01:00
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
|
|
|
|
2023-11-26 22:46:58 +01:00
|
|
|
uptime-kuma:
|
2023-12-09 14:50:52 +01:00
|
|
|
image: louislam/uptime-kuma:latest
|
2023-11-26 22:46:58 +01:00
|
|
|
container_name: uptime-kuma
|
|
|
|
profiles:
|
|
|
|
- uptime-kuma
|
|
|
|
volumes:
|
|
|
|
- uptimekuma_data:/app/data
|
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- blog-network
|
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
|
|
|
|
2023-12-09 14:50:52 +01:00
|
|
|
portainer:
|
|
|
|
image: portainer/portainer-ce:latest
|
|
|
|
container_name: portainer
|
|
|
|
profiles:
|
|
|
|
- portainer
|
|
|
|
restart: on-failure
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
- portainer_data:/data
|
|
|
|
networks:
|
|
|
|
- blog-network
|
|
|
|
security_opt:
|
|
|
|
- no-new-privileges:true
|
2023-04-10 23:42:21 +02:00
|
|
|
networks:
|
|
|
|
blog-network:
|
|
|
|
driver: bridge
|
|
|
|
name: blog-network
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
database:
|
|
|
|
name: database
|
|
|
|
wordpress:
|
|
|
|
name: wordpress
|
|
|
|
caddy_data:
|
|
|
|
name: caddy_data
|
|
|
|
caddy_config:
|
|
|
|
name: caddy_config
|
2023-11-26 22:46:58 +01:00
|
|
|
uptimekuma_data:
|
|
|
|
name: uptimekuma_data
|
2023-12-09 14:50:52 +01:00
|
|
|
portainer_data:
|
|
|
|
name: portainer_data
|