2022-11-24 13:32:59 +01:00
|
|
|
#//////////////////////////////////////////////////////////////
|
|
|
|
#// //
|
2024-05-05 18:14:41 +02:00
|
|
|
#// Infrastructure, 2024 //
|
2022-11-24 13:32:59 +01:00
|
|
|
#// Created: 14, April, 2022 //
|
2024-05-05 18:14:41 +02:00
|
|
|
#// Modified: 05, May, 2024 //
|
2022-11-24 13:32:59 +01:00
|
|
|
#// file: - //
|
|
|
|
#// - //
|
|
|
|
#// Source: //
|
|
|
|
#// OS: ALL //
|
|
|
|
#// CPU: ALL //
|
|
|
|
#// //
|
|
|
|
#//////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
DOCKER := docker
|
|
|
|
|
2024-06-24 23:29:31 +02:00
|
|
|
PROFILES := caddy wordpress adminer backup transmission syncthing uptime-kuma jellyfin qbittorrent psitransfer
|
2023-03-17 22:38:48 +01:00
|
|
|
PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
|
2022-11-24 13:32:59 +01:00
|
|
|
|
2024-06-24 23:29:31 +02:00
|
|
|
# gitea-runner watchtower gitea
|
2024-05-19 22:32:34 +02: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
|
|
|
|
|
|
|
.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
|
|
|
|
2024-05-05 22:38:14 +02:00
|
|
|
.PHONY: update-docker
|
|
|
|
update-docker:
|
2024-05-05 18:14:41 +02:00
|
|
|
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) pull
|
2024-05-05 22:38:14 +02:00
|
|
|
|
|
|
|
.PHONY: update
|
|
|
|
update: update-docker
|
|
|
|
# git submodule update --init --recursive --remote
|
|
|
|
# git pull --recurse-submodules --all --progress
|
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
|