-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
30 lines (22 loc) · 861 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Spread cli arguments
ifneq (,$(filter $(firstword $(MAKECMDGOALS)),exec))
CLI_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(CLI_ARGS):;@:)
endif
docker-compose = docker-compose -f docker-compose.yml $1
-include .env
init:
cp .env.example .env
config:
sed -i 's/MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=${DBPASS}/g' ./docker-compose.yml
sed -i 's/MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=${DBPASS}/g' ./autoinstall.yml
sed -i 's/MYSQL_PASSWORD=.*/MYSQL_PASSWORD=${DBPASS}/g' ./docker-compose.yml
sed -i 's/MYSQL_PASSWORD=.*/MYSQL_PASSWORD=${DBPASS}/g' ./autoinstall.yml
sudo ./runfirst.bash
up:
$(call docker-compose, up -d --force-recreate)
down:
$(call docker-compose, down --volumes)
reup: down up
destroy:
@if [ -d ./distribution-files/mediawiki ]; then sudo rm -fr ./distribution-files/mediawiki; fi