makefile correction user tab && correction make list volume content && added -d to up
This commit is contained in:
7
Makefile
7
Makefile
@@ -24,11 +24,12 @@ RESET = "\e[0m"
|
|||||||
|
|
||||||
COMPOSE = ./srcs/docker-compose.yml
|
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 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 # same as 'LOGIN' var in .env file
|
V_USER = hulamy
|
||||||
VOLUMES_D = /home/$(V_USER)/data/wp_volume \
|
VOLUMES_D = /home/$(V_USER)/data/wp_volume \
|
||||||
/home/$(V_USER)/data/db_volume
|
/home/$(V_USER)/data/db_volume
|
||||||
|
|
||||||
@@ -50,7 +51,7 @@ build:
|
|||||||
docker-compose -f $(COMPOSE) build
|
docker-compose -f $(COMPOSE) build
|
||||||
|
|
||||||
up: volumes
|
up: volumes
|
||||||
docker-compose -f $(COMPOSE) up
|
docker-compose -f $(COMPOSE) up -d
|
||||||
|
|
||||||
# list images, containers, volumes
|
# list images, containers, volumes
|
||||||
list:
|
list:
|
||||||
@@ -59,7 +60,7 @@ list:
|
|||||||
@echo $(B_YELLOW)"\nvolumes:"$(RESET)
|
@echo $(B_YELLOW)"\nvolumes:"$(RESET)
|
||||||
@docker volume ls
|
@docker volume ls
|
||||||
@echo $(B_YELLOW)"\nvolumes content:"$(RESET)
|
@echo $(B_YELLOW)"\nvolumes content:"$(RESET)
|
||||||
@ls $(VOLUMES_D)
|
- @ls $(VOLUMES_D)
|
||||||
@echo $(B_YELLOW)"\nnetworks:"$(RESET)
|
@echo $(B_YELLOW)"\nnetworks:"$(RESET)
|
||||||
@docker network ls
|
@docker network ls
|
||||||
@echo $(B_YELLOW)"\ncontainers:"$(RESET)
|
@echo $(B_YELLOW)"\ncontainers:"$(RESET)
|
||||||
|
|||||||
Reference in New Issue
Block a user