add: network and volumes

This commit is contained in:
starnakin 2023-10-07 16:52:15 +02:00
parent 78b202c264
commit 0b52e973e3

View File

@ -1,3 +1,4 @@
version: "3"
services: services:
nginx: nginx:
container_name: nginx container_name: nginx
@ -9,6 +10,8 @@ services:
- wordpress:/var/www/wordpress - wordpress:/var/www/wordpress
depends_on: depends_on:
- wordpress - wordpress
networks:
- inception
wordpress: wordpress:
container_name: wordpress container_name: wordpress
@ -20,6 +23,8 @@ services:
- mariadb - mariadb
env_file: env_file:
- .env - .env
networks:
- inception
mariadb: mariadb:
container_name: mariadb container_name: mariadb
@ -29,7 +34,26 @@ services:
- mariadb:/data - mariadb:/data
env_file: env_file:
- .env - .env
networks:
- inception
volumes: volumes:
wordpress: wordpress:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/home/cchauvet/data/wp-files/'
mariadb: mariadb:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/home/cchauvet/data/wp-db/'
networks:
inception:
driver: bridge