mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2025-10-10 08:34:32 +02:00
Add config files and optimize Makefile
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
@@ -15,9 +15,14 @@ PROJECT_DIRECTORY ?= infrastructure
|
||||
|
||||
DOCKER_EXEC ?= docker
|
||||
|
||||
DOCKER_PROFILES ?= main_infrastructure
|
||||
CONFIG_DIRECTORY ?= configs
|
||||
CONFIG_FILES ?= $(addprefix $(CONFIG_DIRECTORY)/,$(addsuffix .conf,$(CONFIGS)))
|
||||
include $(CONFIG_FILES)
|
||||
|
||||
PROFILE_CMD ?= $(addprefix --profile ,$(DOCKER_PROFILES))
|
||||
DOCKER_PROFILES ?=
|
||||
EXTRA_PROFILES ?=
|
||||
|
||||
PROFILE_CMD ?= $(addprefix --profile ,$(DOCKER_PROFILES) $(EXTRA_PROFILES))
|
||||
|
||||
COMPOSE_FILES ?= $(shell find ./$(PROJECT_DIRECTORY) -maxdepth 1 -name 'docker-compose*.yml' -type f | sed -e 's/^/--file /')
|
||||
COMPOSE_DIR ?= --project-directory ./$(PROJECT_DIRECTORY)
|
||||
@@ -32,40 +37,20 @@ DOCKER_COMPOSE_COMMAND ?= $(ENV_ARG_VAR) $(DOCKER_EXEC) compose $(COMPOSE_DIR) $
|
||||
.PHONY: build all
|
||||
all: start
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
$(DOCKER_COMPOSE_COMMAND) build
|
||||
GENERIC_TARGETS := build down up run config logs pull images start restart stop
|
||||
|
||||
.PHONY: start
|
||||
start:
|
||||
.PHONY: $(GENERIC_TARGETS)
|
||||
$(GENERIC_TARGETS):
|
||||
$(DOCKER_COMPOSE_COMMAND) $@
|
||||
|
||||
.PHONY: start-detached
|
||||
start-detached:
|
||||
$(DOCKER_COMPOSE_COMMAND) up -d
|
||||
|
||||
.PHONY: start-at
|
||||
start-at:
|
||||
$(DOCKER_COMPOSE_COMMAND) up
|
||||
|
||||
.PHONY: no-start
|
||||
no-start:
|
||||
$(DOCKER_COMPOSE_COMMAND) up --no-start
|
||||
|
||||
.PHONY: check
|
||||
check:
|
||||
$(DOCKER_COMPOSE_COMMAND) config
|
||||
|
||||
.PHONY: stop
|
||||
stop: down
|
||||
|
||||
.PHONY: down
|
||||
down:
|
||||
$(DOCKER_COMPOSE_COMMAND) down
|
||||
|
||||
.PHONY: restart
|
||||
restart: stop start
|
||||
|
||||
.PHONY: logs
|
||||
logs:
|
||||
$(DOCKER_COMPOSE_COMMAND) logs
|
||||
|
||||
.PHONY: state
|
||||
state:
|
||||
$(DOCKER_COMPOSE_COMMAND) ps
|
||||
@@ -75,10 +60,6 @@ state:
|
||||
volumes:
|
||||
$(DOCKER_COMPOSE_COMMAND) config --volumes
|
||||
|
||||
.PHONY: image-update
|
||||
image-update:
|
||||
$(DOCKER_COMPOSE_COMMAND) pull
|
||||
|
||||
.PHONY: git-update
|
||||
git-update:
|
||||
# git submodule update --init --recursive --remote
|
||||
|
24
Makefile
24
Makefile
@@ -11,29 +11,21 @@
|
||||
#// //
|
||||
#//////////////////////////////////////////////////////////////
|
||||
|
||||
ADMIN_SERVICES := openssh uptime-kuma
|
||||
#ADMIN_SERVICES := openssh
|
||||
# uptime-kuma
|
||||
#BLOG_SERVICES := wordpress
|
||||
#7DAYS_TO_DIE_SERVICES := 7daystodie_server 7daystodie_backup
|
||||
#MINECRAFT_SERVICES := minecraft_server minecraft_backup
|
||||
#SATISFACTORY_SERVICES := satisfactory_server satisfactory_backup
|
||||
TEAM_FORTRESS_SERVICES := teamfortress2_server
|
||||
# teamfortress2_backup
|
||||
# gitea gitea-runner
|
||||
#IA_SERVICES := open-webui
|
||||
SHARING_SERVICES := privatebin
|
||||
#SHARING_SERVICES := privatebin
|
||||
# jellyfin
|
||||
# psitransfer picoshare projectsend dufs syncthing
|
||||
TORRENTS_SERVICES := qbittorrent
|
||||
# transmission
|
||||
UTILS_SERVICES := it-tools omni-tools cyberchef
|
||||
#UTILS_SERVICES := it-tools omni-tools cyberchef
|
||||
# homepage
|
||||
# stirlingpdf
|
||||
MAIN_SERVICES := main_infrastructure caddy homepage
|
||||
|
||||
PROJECT_DIRECTORY := infrastructure
|
||||
CONFIG_DIRECTORY := configs
|
||||
|
||||
DOCKER_PROFILES := $(MAIN_SERVICES) $(ADMIN_SERVICES) $(BLOG_SERVICES) \
|
||||
$(7DAYS_TO_DIE_SERVICES) $(MINECRAFT_SERVICES) $(SATISFACTORY_SERVICES) \
|
||||
$(GIT_SERVICES) $(IA_SERVICES) $(SHARING_SERVICES) \
|
||||
$(TORRENTS_SERVICES) $(UTILS_SERVICES)
|
||||
CONFIGS := torrent
|
||||
#DOCKER_PROFILES :=
|
||||
|
||||
include DockerCompose.mk
|
||||
|
1
configs/7dtd.conf
Normal file
1
configs/7dtd.conf
Normal file
@@ -0,0 +1 @@
|
||||
DOCKER_PROFILES += 7daystodie_server 7daystodie_backup
|
2
configs/forgejo.conf
Normal file
2
configs/forgejo.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
DOCKER_PROFILES += forgejo forgejo-runner
|
||||
# DOCKER_PROFILES += gitea gitea-runner
|
1
configs/minecraft.conf
Normal file
1
configs/minecraft.conf
Normal file
@@ -0,0 +1 @@
|
||||
DOCKER_PROFILES += minecraft_server minecraft_backup
|
1
configs/satisfactory.conf
Normal file
1
configs/satisfactory.conf
Normal file
@@ -0,0 +1 @@
|
||||
DOCKER_PROFILES += satisfactory_server satisfactory_backup
|
2
configs/tf2.conf
Normal file
2
configs/tf2.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
DOCKER_PROFILES += teamfortress2_server
|
||||
# teamfortress2_backup
|
3
configs/torrent.conf
Normal file
3
configs/torrent.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
DOCKER_PROFILES += main_infrastructure caddy
|
||||
DOCKER_PROFILES += qbittorrent
|
||||
# transmission
|
@@ -1,7 +1,7 @@
|
||||
services:
|
||||
# Caddy
|
||||
caddy:
|
||||
image: caddy:latest
|
||||
image: bensuperpc/caddy-l4:latest
|
||||
container_name: caddy
|
||||
profiles:
|
||||
- caddy
|
||||
|
Reference in New Issue
Block a user