From d79a2df0a59d711b6112962c1b80bdefab906ad6 Mon Sep 17 00:00:00 2001 From: JeronimoC23 Date: Wed, 22 Dec 2021 14:19:37 -0300 Subject: [PATCH] improve make-reset --- Makefile | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e8a78ba..2d13e3a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,11 @@ +# Variables to define the container path +docker_image_name = omeka current_dir = $(notdir $(shell pwd)) -addres_to_copy_the_lan_config = $(addprefix $(current_dir),_omeka_1:/var/www/html/application/config/config.ini) +container_name := $(current_dir)_$(docker_image_name)_1 +container_path_to_copy_config_file = $(addprefix $(container_name),:/var/www/html/application/config/config.ini) + + +# Help commands list: @docker image ls @@ -8,7 +14,7 @@ down: @docker-compose down delete-image: - @docker image rm omeka + @docker image rm $(docker_image_name) up: @docker-compose up @@ -17,6 +23,11 @@ stop: @docker-compose stop copy-config: - @docker cp ./config.ini $(addres_to_copy_the_lan_config) + @docker cp ./config.ini $(container_path_to_copy_config_file) + + +# Build and spanish config +build-config: up copy-config -reset: down delete-image up copy-config stop up +# Re-build and spanish config +rebuild-docker-image: down delete-image up copy-config