makefile correction user tab && correction make list volume content && added -d to up

This commit is contained in:
hulamy
2022-09-25 22:19:16 +02:00
parent 10877ee675
commit 19d24ab958

View File

@@ -24,11 +24,12 @@ RESET = "\e[0m"
COMPOSE = ./srcs/docker-compose.yml
# same as 'LOGIN' var in .env file
#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 # same as 'LOGIN' var in .env file
V_USER = hulamy
VOLUMES_D = /home/$(V_USER)/data/wp_volume \
/home/$(V_USER)/data/db_volume
@@ -50,7 +51,7 @@ build:
docker-compose -f $(COMPOSE) build
up: volumes
docker-compose -f $(COMPOSE) up
docker-compose -f $(COMPOSE) up -d
# list images, containers, volumes
list:
@@ -59,7 +60,7 @@ list:
@echo $(B_YELLOW)"\nvolumes:"$(RESET)
@docker volume ls
@echo $(B_YELLOW)"\nvolumes content:"$(RESET)
@ls $(VOLUMES_D)
- @ls $(VOLUMES_D)
@echo $(B_YELLOW)"\nnetworks:"$(RESET)
@docker network ls
@echo $(B_YELLOW)"\ncontainers:"$(RESET)