inception/Makefile
Danny Houtworm 72b12d749d bla
2023-08-14 08:41:31 +00:00

25 lines
1.0 KiB
Makefile

all: up
build:
sudo docker network create --subnet=172.20.30.0/24 wordpress
sudo mkdir -p ./build /home/djonker/data/adminer /home/djonker/data/wordpress /home/djonker/data/nginx
sudo touch /home/djonker/data/nginx/access.log
sudo cp srcs/requirements/wordpress/srcs/wordpress.conf /home/djonker/data/wordpress/wp-config.php.temp
sudo curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
sudo mv wp-cli.phar /home/djonker/data/wordpress/wp-cli.phar
sudo chmod +x /home/djonker/data/wordpress/wp-cli.phar
sudo curl -L https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1.php --output /home/djonker/data/adminer/adminer.php
sudo curl -L https://download.nextcloud.com/server/releases/latest.zip --output ~/data/nextcloud.zip
sudo unzip -d ~/data ~/data/nextcloud.zip
up: build
sudo docker-compose -f ./srcs/docker-compose.yml up -d
sudo systemctl restart fail2ban
down:
sudo docker-compose -f ./srcs/docker-compose.yml down
clean: down
yes | sudo docker system prune -a
sudo rm -rf /home/djonker/data ./build