From 0b52e973e3d55b15d0d4893a8281eeb302eedf3b Mon Sep 17 00:00:00 2001 From: starnakin Date: Sat, 7 Oct 2023 16:52:15 +0200 Subject: [PATCH] add: network and volumes --- srcs/docker-compose.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/srcs/docker-compose.yml b/srcs/docker-compose.yml index 3fcc05a..ca6506e 100644 --- a/srcs/docker-compose.yml +++ b/srcs/docker-compose.yml @@ -1,3 +1,4 @@ +version: "3" services: nginx: container_name: nginx @@ -9,6 +10,8 @@ services: - wordpress:/var/www/wordpress depends_on: - wordpress + networks: + - inception wordpress: container_name: wordpress @@ -20,6 +23,8 @@ services: - mariadb env_file: - .env + networks: + - inception mariadb: container_name: mariadb @@ -29,7 +34,26 @@ services: - mariadb:/data env_file: - .env + networks: + - inception volumes: + wordpress: + driver: local + driver_opts: + type: 'none' + o: 'bind' + device: '/home/cchauvet/data/wp-files/' + mariadb: + driver: local + driver_opts: + type: 'none' + o: 'bind' + device: '/home/cchauvet/data/wp-db/' + + +networks: + inception: + driver: bridge