From 3be5af0e68599f55ca2b8390c987b53b0e83385c Mon Sep 17 00:00:00 2001 From: hugo gogo Date: Mon, 19 Sep 2022 00:47:04 +0200 Subject: [PATCH] volumes work now --- Makefile | 3 +-- srcs/docker-compose.yml | 22 +++++++++------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 48b0661..552a9e5 100644 --- a/Makefile +++ b/Makefile @@ -42,8 +42,7 @@ VOLUMES = $(shell $(SUDO) docker volume ls -q) all: build $(VOLUMES_D) up $(VOLUMES_D): - echo volumes -# mkdir -p $(VOLUMES_D) + mkdir -p $(VOLUMES_D) build: $(SUDO) docker-compose -f $(COMPOSE) build diff --git a/srcs/docker-compose.yml b/srcs/docker-compose.yml index b5ea3ca..ebd5103 100644 --- a/srcs/docker-compose.yml +++ b/srcs/docker-compose.yml @@ -28,8 +28,8 @@ services: env_file: .env networks: - inception -# volumes: -# - db_volume:/var/lib/mysql + volumes: + - db_volume:/var/lib/mysql build: context: ./requirements/mariadb args: @@ -45,11 +45,7 @@ services: networks: - inception volumes: - - type: volume - source: wp_volume - target: /var/www/html - bind: - create_host_path: true + - wp_volume:/var/www/html build: ./requirements/wordpress image: wordpress container_name: wordpress_container @@ -65,12 +61,12 @@ volumes: type: none o: "bind" device: /home/${LOGIN}/data/wp_volume -# db_volume: -# driver: local -# driver_opts: -# type: none -# o: "bind" -# mountpoint: /home/${LOGIN}/data/db_volume + db_volume: + driver: local + driver_opts: + type: none + o: "bind" + device: /home/${LOGIN}/data/db_volume networks: inception: