diff --git a/Makefile b/Makefile index 3c73c3c..843314d 100644 --- a/Makefile +++ b/Makefile @@ -25,20 +25,20 @@ RESET = "\e[0m" COMPOSE = ./srcs/docker-compose.yml # same as 'LOGIN' var in .env file +#V_USER = hulamy #V_USER = $(shell echo $(USER)) # gives root when make is run with sudo #V_USER = $(shell who | head -1 | tr " " "\n" | head -1) # gives bad result when in `sudo su` #V_USER = $(shell who | head -1 | cut -d " " -f 1) # gives bad result when in `sudo su` #V_USER = $(shell users | tr " " "\n" | head -1) -V_USER = hulamy -VOLUMES_D = /home/$(V_USER)/data/wp_volume \ - /home/$(V_USER)/data/db_volume +V_HOME = $(HOME) +VOLUMES_D = $(V_HOME)/data/wp_volume \ + $(V_HOME)/data/db_volume # list of running containers, see : https://stackoverflow.com/questions/10024279/how-to-use-shell-commands-in-makefile RUNNING = $(shell docker ps -q) # list of volumes VOLUMES = $(shell docker volume ls -q) - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # diff --git a/srcs/.env b/srcs/.env index 2562296..d3dca66 100644 --- a/srcs/.env +++ b/srcs/.env @@ -1,8 +1,4 @@ -# DOCKER-COMPOSE - -LOGIN=hulamy - # MARIADB SETUP DB_HOST=mariadb diff --git a/srcs/docker-compose.yml b/srcs/docker-compose.yml index fc79b33..ef7ab1f 100644 --- a/srcs/docker-compose.yml +++ b/srcs/docker-compose.yml @@ -78,13 +78,15 @@ volumes: driver_opts: type: none o: "bind" - device: /home/${LOGIN}/data/wp_volume + device: ${HOME}/data/wp_volume +# device: /home/${LOGIN}/data/wp_volume db_volume: driver: local driver_opts: type: none o: "bind" - device: /home/${LOGIN}/data/db_volume + device: ${HOME}/data/db_volume +# device: /home/${LOGIN}/data/db_volume networks: inception: