Update Caddy and Makefile

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2024-09-08 13:55:28 +02:00
parent 35e54a598c
commit 1b9c6ad1ad
3 changed files with 24 additions and 20 deletions

View File

@ -13,61 +13,65 @@
DOCKER := docker DOCKER := docker
BLOG_SERVICES := wordpress
TORRENTS_SERVICES := qbittorrent transmission TORRENTS_SERVICES := qbittorrent transmission
SHARING_SERVICES := psitransfer picoshare privatebin projectsend jellyfin dufs SHARING_SERVICES := psitransfer picoshare privatebin projectsend jellyfin dufs gitea syncthing
ADMIN_SERVICES := yacht uptime-kuma adminer ADMIN_SERVICES := yacht uptime-kuma adminer
UTILS_SERVICES := it-tools stirlingpdf UTILS_SERVICES := it-tools stirlingpdf
PROFILES := caddy wordpress syncthing gitea homepage $(SHARING_SERVICES) $(TORRENTS_SERVICES) $(ADMIN_SERVICES) $(UTILS_SERVICES)
PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
# gitea-runner # gitea-runner
COMPOSE_FILES := $(shell find . -name 'docker-compose*.yml' -type f | sed -e 's/^/--file /') PROFILES := caddy homepage $(BLOG_SERVICES) $(SHARING_SERVICES) $(TORRENTS_SERVICES) $(ADMIN_SERVICES) $(UTILS_SERVICES)
PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
COMPOSE_FILES := $(shell find . -name 'docker-compose*.yml' -type f | sed -e 's/^/--file /')
COMPOSE_DIR := --project-directory ./infrastructure COMPOSE_DIR := --project-directory ./infrastructure
UID := 1000
GID := 1000
BUILD_ARG_VAR := --build-arg UID=$(UID) --build-arg GID=$(GID)
.PHONY: build all .PHONY: build all
all: start all: start
.PHONY: build .PHONY: build
build: build:
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) build $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) build
.PHONY: start .PHONY: start
start: start:
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) up -d $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) up -d
.PHONY: start-at .PHONY: start-at
start-at: start-at:
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) up $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) up
.PHONY: docker-check .PHONY: docker-check
docker-check: docker-check:
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) config $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) config
.PHONY: stop .PHONY: stop
stop: down stop: down
.PHONY: down .PHONY: down
down: down:
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down
.PHONY: restart .PHONY: restart
restart: stop start restart: stop start
.PHONY: logs .PHONY: logs
logs: logs:
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) logs $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) logs
.PHONY: state .PHONY: state
state: state:
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) ps $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) ps
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) top $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) top
.PHONY: update-docker .PHONY: update-docker
update-docker: update-docker:
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) pull $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) pull
.PHONY: update .PHONY: update
update: update-docker update: update-docker
@ -80,4 +84,4 @@ clean:
.PHONY: purge .PHONY: purge
purge: purge:
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down -v --rmi all $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down -v --rmi all

View File

@ -3,7 +3,7 @@ www.bensuperpc.org {
} }
bensuperpc.org { bensuperpc.org {
redir https://www.bensuperpc.org permanent redir https://www.{host}{uri} permanent
} }
homepage.bensuperpc.org { homepage.bensuperpc.org {

View File

@ -12,7 +12,7 @@ services:
- ./syncthing/env/syncthing.env - ./syncthing/env/syncthing.env
volumes: volumes:
- syncthing_config:/config - syncthing_config:/config
- syncthing_data:/data1 - public_data:/data1
networks: networks:
- infra-network - infra-network
security_opt: security_opt:
@ -21,5 +21,5 @@ services:
volumes: volumes:
syncthing_config: syncthing_config:
name: syncthing_config name: syncthing_config
syncthing_data: public_data:
name: syncthing_data name: public_data