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
|
COMPOSE = ./srcs/docker-compose.yml
|
||||||
|
|
||||||
# same as 'LOGIN' var in .env file
|
# 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 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 | 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 who | head -1 | cut -d " " -f 1) # gives bad result when in `sudo su`
|
||||||
#V_USER = $(shell users | tr " " "\n" | head -1)
|
#V_USER = $(shell users | tr " " "\n" | head -1)
|
||||||
V_USER = hulamy
|
V_HOME = $(HOME)
|
||||||
VOLUMES_D = /home/$(V_USER)/data/wp_volume \
|
VOLUMES_D = $(V_HOME)/data/wp_volume \
|
||||||
/home/$(V_USER)/data/db_volume
|
$(V_HOME)/data/db_volume
|
||||||
|
|
||||||
# list of running containers, see : https://stackoverflow.com/questions/10024279/how-to-use-shell-commands-in-makefile
|
# list of running containers, see : https://stackoverflow.com/questions/10024279/how-to-use-shell-commands-in-makefile
|
||||||
RUNNING = $(shell docker ps -q)
|
RUNNING = $(shell docker ps -q)
|
||||||
# list of volumes
|
# list of volumes
|
||||||
VOLUMES = $(shell docker volume ls -q)
|
VOLUMES = $(shell docker volume ls -q)
|
||||||
|
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
|
|
||||||
# DOCKER-COMPOSE
|
|
||||||
|
|
||||||
LOGIN=hulamy
|
|
||||||
|
|
||||||
# MARIADB SETUP
|
# MARIADB SETUP
|
||||||
|
|
||||||
DB_HOST=mariadb
|
DB_HOST=mariadb
|
||||||
|
|||||||
@@ -78,13 +78,15 @@ volumes:
|
|||||||
driver_opts:
|
driver_opts:
|
||||||
type: none
|
type: none
|
||||||
o: "bind"
|
o: "bind"
|
||||||
device: /home/${LOGIN}/data/wp_volume
|
device: ${HOME}/data/wp_volume
|
||||||
|
# device: /home/${LOGIN}/data/wp_volume
|
||||||
db_volume:
|
db_volume:
|
||||||
driver: local
|
driver: local
|
||||||
driver_opts:
|
driver_opts:
|
||||||
type: none
|
type: none
|
||||||
o: "bind"
|
o: "bind"
|
||||||
device: /home/${LOGIN}/data/db_volume
|
device: ${HOME}/data/db_volume
|
||||||
|
# device: /home/${LOGIN}/data/db_volume
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
inception:
|
inception:
|
||||||
|
|||||||
Reference in New Issue
Block a user