2022-11-24 13:32:59 +01:00
|
|
|
#//////////////////////////////////////////////////////////////
|
|
|
|
#// ____ //
|
|
|
|
#// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
|
|
|
|
#// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
|
|
|
|
#// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
|
|
|
|
#// |____/ \___|_| |_|___/\__,_| .__/ \___|_| | .__/ \___| //
|
|
|
|
#// |_| |_| //
|
|
|
|
#//////////////////////////////////////////////////////////////
|
|
|
|
#// //
|
2023-04-10 23:42:21 +02:00
|
|
|
#// Infrastructur, 2022 //
|
2022-11-24 13:32:59 +01:00
|
|
|
#// Created: 14, April, 2022 //
|
2023-11-25 17:46:53 +01:00
|
|
|
#// Modified: 25, Novembre, 2023 //
|
2022-11-24 13:32:59 +01:00
|
|
|
#// file: - //
|
|
|
|
#// - //
|
|
|
|
#// Source: //
|
|
|
|
#// OS: ALL //
|
|
|
|
#// CPU: ALL //
|
|
|
|
#// //
|
|
|
|
#//////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
DOCKER := docker
|
|
|
|
|
2024-05-04 17:07:38 +02:00
|
|
|
PROFILES := webserver database wordpress adminer uptime-kuma portainer qbittorrent gitea
|
2023-03-17 22:38:48 +01:00
|
|
|
PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
|
2022-11-24 13:32:59 +01:00
|
|
|
|
2023-11-26 22:46:58 +01:00
|
|
|
COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /')
|
2022-11-24 13:32:59 +01:00
|
|
|
|
2023-03-17 22:38:48 +01:00
|
|
|
AUTHOR := bensuperpc
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: build all
|
|
|
|
all: start
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
2023-03-17 22:38:48 +01:00
|
|
|
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) build
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: start
|
|
|
|
start:
|
2023-03-17 22:38:48 +01:00
|
|
|
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) up -d
|
2022-11-24 13:32:59 +01:00
|
|
|
|
2023-03-17 22:38:48 +01:00
|
|
|
.PHONY: start-at
|
2022-11-24 13:32:59 +01:00
|
|
|
start-at:
|
2023-03-17 22:38:48 +01:00
|
|
|
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) up
|
|
|
|
|
|
|
|
.PHONY: docker-check
|
|
|
|
docker-check:
|
2023-12-09 14:50:52 +01:00
|
|
|
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) config
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: stop
|
|
|
|
stop: down
|
|
|
|
|
|
|
|
.PHONY: down
|
|
|
|
down:
|
2023-03-17 22:38:48 +01:00
|
|
|
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) down
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: restart
|
|
|
|
restart: stop start
|
|
|
|
|
|
|
|
.PHONY: logs
|
|
|
|
logs:
|
2023-03-17 22:38:48 +01:00
|
|
|
docker compose $(COMPOSE_FILES) logs
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: state
|
|
|
|
state:
|
2023-03-17 22:38:48 +01:00
|
|
|
docker compose $(COMPOSE_FILES) ps
|
|
|
|
docker compose $(COMPOSE_FILES) top
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: update
|
|
|
|
update:
|
2023-04-10 23:42:21 +02:00
|
|
|
git submodule update --init --recursive --remote
|
2022-11-24 13:32:59 +01:00
|
|
|
git pull --recurse-submodules --all --progress
|
2023-12-09 14:50:52 +01:00
|
|
|
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) pull
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
$(DOCKER) images --filter=reference='bensuperpc/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f
|
|
|
|
|
|
|
|
.PHONY: purge
|
|
|
|
purge:
|
2023-03-17 22:38:48 +01:00
|
|
|
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) down -v --rmi all
|