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-08-28 23:31:13 +02:00
|
|
|
TORRENTS_SERVICES := qbittorrent transmission
|
2024-09-02 20:14:27 +02:00
|
|
|
SHARING_SERVICES := psitransfer picoshare privatebin projectsend jellyfin dufs
|
2024-08-28 23:31:13 +02:00
|
|
|
ADMIN_SERVICES := yacht uptime-kuma adminer
|
2024-09-03 23:31:53 +02:00
|
|
|
UTILS_SERVICES := it-tools stirlingpdf
|
2024-08-28 23:31:13 +02:00
|
|
|
|
|
|
|
PROFILES := caddy wordpress syncthing gitea homepage $(SHARING_SERVICES) $(TORRENTS_SERVICES) $(ADMIN_SERVICES) $(UTILS_SERVICES)
|
2023-03-17 22:38:48 +01:00
|
|
|
PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
|
2022-11-24 13:32:59 +01:00
|
|
|
|
2024-08-28 23:31:13 +02:00
|
|
|
# gitea-runner dozzle watchtower
|
2024-05-19 22:32:34 +02:00
|
|
|
|
2024-08-23 13:58:01 +02:00
|
|
|
COMPOSE_FILES := $(shell find . -name 'docker-compose*.yml' -type f | sed -e 's/^/--file /')
|
|
|
|
|
|
|
|
COMPOSE_DIR := --project-directory ./infrastructure
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: build all
|
|
|
|
all: start
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
2024-08-23 13:58:01 +02:00
|
|
|
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) build
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: start
|
|
|
|
start:
|
2024-08-23 13:58:01 +02:00
|
|
|
docker compose $(COMPOSE_DIR) $(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:
|
2024-08-23 13:58:01 +02:00
|
|
|
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) up
|
2023-03-17 22:38:48 +01:00
|
|
|
|
|
|
|
.PHONY: docker-check
|
|
|
|
docker-check:
|
2024-08-23 13:58:01 +02:00
|
|
|
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) config
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: stop
|
|
|
|
stop: down
|
|
|
|
|
|
|
|
.PHONY: down
|
|
|
|
down:
|
2024-08-23 13:58:01 +02:00
|
|
|
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: restart
|
|
|
|
restart: stop start
|
|
|
|
|
|
|
|
.PHONY: logs
|
|
|
|
logs:
|
2024-08-23 13:58:01 +02:00
|
|
|
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) logs
|
2022-11-24 13:32:59 +01:00
|
|
|
|
|
|
|
.PHONY: state
|
|
|
|
state:
|
2024-08-23 13:58:01 +02:00
|
|
|
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) ps
|
|
|
|
docker compose $(COMPOSE_DIR) $(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-08-23 13:58:01 +02:00
|
|
|
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) pull
|
2024-05-05 22:38:14 +02:00
|
|
|
|
|
|
|
.PHONY: update
|
|
|
|
update: update-docker
|
2024-08-23 14:12:41 +02:00
|
|
|
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:
|
2024-08-23 13:58:01 +02:00
|
|
|
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down -v --rmi all
|