2023-06-25 05:14:43 +02:00
|
|
|
all: up
|
2023-06-25 04:12:03 +02:00
|
|
|
|
2023-06-25 05:14:43 +02:00
|
|
|
build:
|
|
|
|
sudo docker network create --subnet=172.20.30.0/24 wordpress
|
2023-08-10 06:35:23 +02:00
|
|
|
sudo mkdir ./build ~/data
|
|
|
|
sudo curl -f https://wordpress.org/latest.tar.gz --output ~/data/latest.tar.gz
|
|
|
|
sudo tar -xvf ~/data/latest.tar.gz
|
|
|
|
sudo mv wordpress ~/data/wordpress
|
|
|
|
sudo cp srcs/requirements/wordpress/srcs/wordpress.conf ~/data/wordpress/wp-config.php
|
|
|
|
sudo chown -R root:root ~/data/wordpress
|
2023-06-25 05:14:43 +02:00
|
|
|
|
|
|
|
up: build
|
2023-06-25 07:03:46 +02:00
|
|
|
sudo docker-compose -f ./srcs/docker-compose.yml up -d
|
2023-06-25 04:12:03 +02:00
|
|
|
|
2023-06-25 05:14:43 +02:00
|
|
|
down:
|
2023-06-25 07:03:46 +02:00
|
|
|
sudo docker-compose -f ./srcs/docker-compose.yml down
|
2023-06-25 04:12:03 +02:00
|
|
|
|
2023-06-25 05:14:43 +02:00
|
|
|
clean: down
|
2023-06-25 09:05:00 +02:00
|
|
|
yes | sudo docker system prune -a
|
2023-08-10 06:35:23 +02:00
|
|
|
sudo rm -rf ~/data ./build
|