changed gestion of home user in makefile and env and docker-compose
This commit is contained in:
8
Makefile
8
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)
|
||||
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
|
||||
|
||||
Reference in New Issue
Block a user