Merge branch 'makefile_phony' into 'master'

PHONY Makefile recipes

See merge request digitaldemocratic/digitaldemocratic!4
Josep Maria Viñolas Auquer 2021-05-20 03:56:46 +00:00
commit a4a417ecee
1 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@ export VERSION
CUSTOM_PATH=$(shell pwd) CUSTOM_PATH=$(shell pwd)
.PHONY: environment
environment: environment:
git submodule update --init --recursive git submodule update --init --recursive
#cp custom/menu/* isard-sso/docker/api/src/ #cp custom/menu/* isard-sso/docker/api/src/
@ -36,6 +37,7 @@ environment:
cp digitaldemocratic.conf docker-compose-parts/.env cp digitaldemocratic.conf docker-compose-parts/.env
echo "BUILD_ROOT_PATH=$(CUSTOM_PATH)" >> docker-compose-parts/.env echo "BUILD_ROOT_PATH=$(CUSTOM_PATH)" >> docker-compose-parts/.env
.PHONY: build
build: environment build: environment
echo BUILD_ROOT_PATH=$(CUSTOM_PATH)/isard-sso > .env echo BUILD_ROOT_PATH=$(CUSTOM_PATH)/isard-sso > .env
docker-compose -f docker-compose-parts/backup.yml \ docker-compose -f docker-compose-parts/backup.yml \
@ -65,12 +67,15 @@ build: environment
rm dd.yml sso.yml apps.yml rm dd.yml sso.yml apps.yml
docker-compose build docker-compose build
.PHONY: up
up: build up: build
docker-compose up -d --no-deps docker-compose up -d --no-deps
.PHONY: down
down: down:
docker-compose down docker-compose down
.PHONY: remove
remove: down remove: down
rm -rf /opt/digitaldemocratic/postgres rm -rf /opt/digitaldemocratic/postgres
rm -rf /opt/digitaldemocratic/redis rm -rf /opt/digitaldemocratic/redis
@ -80,6 +85,7 @@ remove: down
rm -rf /opt/digitaldemocratic/freeipa rm -rf /opt/digitaldemocratic/freeipa
# Leaves haproxy folder with certificates. Remove manually to get new certificates. # Leaves haproxy folder with certificates. Remove manually to get new certificates.
.PHONY: add-plugins
add-plugins: add-plugins:
# Nextcloud # Nextcloud
#cp -R $$BUILD_ROOT_PATH/isard-apps/docker/nextcloud/themes/* $$DATA_FOLDER/nextcloud/themes/ #cp -R $$BUILD_ROOT_PATH/isard-apps/docker/nextcloud/themes/* $$DATA_FOLDER/nextcloud/themes/
@ -122,5 +128,6 @@ add-plugins:
## Multisite ## Multisite
docker exec -ti isard-apps-wordpress /bin/sh -c "/multisite.sh" docker exec -ti isard-apps-wordpress /bin/sh -c "/multisite.sh"
.PHONY: connect-saml
connect-saml: connect-saml:
while [ "`docker inspect -f {{.State.Health.Status}} isard-apps-moodle`" != "healthy" ]; do sleep 2; done while [ "`docker inspect -f {{.State.Health.Status}} isard-apps-moodle`" != "healthy" ]; do sleep 2; done