-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
13 lines (11 loc) · 1.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
SHELL = /bin/bash
.PHONY: install
install:
@echo "Generating files to match the host User and Group IDs for the container..."
@source .env.sh; rm -f Dockerfile; CONTAINER_VARS='$$HOST_USER_ID:$$HOST_GROUP_ID:$$HOST_USER'; envsubst "$$CONTAINER_VARS" < "templates/Dockerfile.template" > "Dockerfile";
@source .env.sh; rm -f config/group.sh; CONTAINER_VARS='$$HOST_GROUP_ID:$$HOST_USER'; envsubst "$$CONTAINER_VARS" < "templates/group.sh.template" > "config/group.sh";
@source .env.sh; rm -f bin/database.php; CONTAINER_VARS='$$CONTAINERS_PREFIX'; envsubst "$$CONTAINER_VARS" < "templates/database.php.template" > "bin/database.php";
@source .env.sh; rm -f config/.bashrc; CONTAINER_VARS='$$CONTAINER_HOSTNAME'; envsubst "$$CONTAINER_VARS" < "templates/.bashrc.template" > "config/.bashrc";
@source .env.sh; rm -f docker-compose.yml; CONTAINER_VARS='$$CONTAINERS_PREFIX:$$DB_ROOT_PASSWORD'; envsubst "$$CONTAINER_VARS" < "templates/docker-compose.yml.template" > "docker-compose.yml";
@echo "Building containers..."
@docker-compose up -d