mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2025-01-05 07:14:25 +01:00
Compare commits
4 Commits
35e54a598c
...
540bf34947
Author | SHA1 | Date | |
---|---|---|---|
540bf34947 | |||
6817b3deb0 | |||
860be99a4e | |||
1b9c6ad1ad |
38
Makefile
38
Makefile
@ -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
|
||||||
|
|
||||||
|
ENV_ARG_VAR := PUID=$(UID) PGID=$(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
|
$(ENV_ARG_VAR) $(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
|
$(ENV_ARG_VAR) $(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
|
$(ENV_ARG_VAR) $(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
|
$(ENV_ARG_VAR) $(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
|
$(ENV_ARG_VAR) $(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
|
$(ENV_ARG_VAR) $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) logs
|
||||||
|
|
||||||
.PHONY: state
|
.PHONY: state
|
||||||
state:
|
state:
|
||||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) ps
|
$(ENV_ARG_VAR) $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) ps
|
||||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) top
|
$(ENV_ARG_VAR) $(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
|
$(ENV_ARG_VAR) $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) pull
|
||||||
|
|
||||||
.PHONY: update
|
.PHONY: update
|
||||||
update: update-docker
|
update: update-docker
|
||||||
@ -76,8 +80,8 @@ update: update-docker
|
|||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
$(DOCKER) images --filter=reference='bensuperpc/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f
|
$(ENV_ARG_VAR) $(DOCKER) images --filter=reference='bensuperpc/*' --format='{{.Repository}}:{{.Tag}}' | xargs -r $(DOCKER) rmi -f
|
||||||
|
|
||||||
.PHONY: purge
|
.PHONY: purge
|
||||||
purge:
|
purge:
|
||||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down -v --rmi all
|
$(ENV_ARG_VAR) $(DOCKER) compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down -v --rmi all
|
@ -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 {
|
||||||
|
@ -5,7 +5,7 @@ services:
|
|||||||
container_name: dufs
|
container_name: dufs
|
||||||
profiles:
|
profiles:
|
||||||
- dufs
|
- dufs
|
||||||
user: 1000:1000
|
user: ${PUID:-1000}:${PGID:-1000}
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
depends_on:
|
depends_on:
|
||||||
- caddy
|
- caddy
|
||||||
|
@ -6,7 +6,7 @@ services:
|
|||||||
profiles:
|
profiles:
|
||||||
- jellyfin
|
- jellyfin
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
user: 1000:1000
|
user: ${PUID:-1000}:${PGID:-1000}
|
||||||
depends_on:
|
depends_on:
|
||||||
- caddy
|
- caddy
|
||||||
env_file:
|
env_file:
|
||||||
|
@ -32,6 +32,9 @@ services:
|
|||||||
- projectsend_db:/var/lib/mysql:rw
|
- projectsend_db:/var/lib/mysql:rw
|
||||||
env_file:
|
env_file:
|
||||||
- ./projectsend/env/projectsend_db.env
|
- ./projectsend/env/projectsend_db.env
|
||||||
|
environment:
|
||||||
|
- PUID=${PUID:-1000}
|
||||||
|
- PGID=${PGID:-1000}
|
||||||
command: '--default-authentication-plugin=mysql_native_password'
|
command: '--default-authentication-plugin=mysql_native_password'
|
||||||
networks:
|
networks:
|
||||||
- infra-network
|
- infra-network
|
||||||
|
@ -1,3 +1 @@
|
|||||||
PUID=1000
|
|
||||||
PGID=1000
|
|
||||||
MAX_UPLOAD=50000
|
MAX_UPLOAD=50000
|
||||||
|
@ -6,7 +6,7 @@ services:
|
|||||||
profiles:
|
profiles:
|
||||||
- psitransfer
|
- psitransfer
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
user: 1000:1000
|
user: ${PUID:-1000}:${PGID:-1000}
|
||||||
depends_on:
|
depends_on:
|
||||||
- caddy
|
- caddy
|
||||||
env_file:
|
env_file:
|
||||||
|
@ -10,6 +10,9 @@ services:
|
|||||||
- caddy
|
- caddy
|
||||||
env_file:
|
env_file:
|
||||||
- ./qbittorrent/env/qbittorrent.env
|
- ./qbittorrent/env/qbittorrent.env
|
||||||
|
environment:
|
||||||
|
- PUID=${PUID:-1000}
|
||||||
|
- PGID=${PGID:-1000}
|
||||||
volumes:
|
volumes:
|
||||||
- qbittorrent_config:/config
|
- qbittorrent_config:/config
|
||||||
- public_data:/downloads
|
- public_data:/downloads
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
PUID=1000
|
|
||||||
PGID=1000
|
|
||||||
TZ=Etc/UTC
|
TZ=Etc/UTC
|
||||||
WEBUI_PORT=8080
|
WEBUI_PORT=8080
|
||||||
TORRENTING_PORT=6881
|
TORRENTING_PORT=6881
|
@ -10,9 +10,12 @@ services:
|
|||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
env_file:
|
env_file:
|
||||||
- ./syncthing/env/syncthing.env
|
- ./syncthing/env/syncthing.env
|
||||||
|
environment:
|
||||||
|
- PUID=${PUID:-1000}
|
||||||
|
- PGID=${PGID:-1000}
|
||||||
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 +24,5 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
syncthing_config:
|
syncthing_config:
|
||||||
name: syncthing_config
|
name: syncthing_config
|
||||||
syncthing_data:
|
public_data:
|
||||||
name: syncthing_data
|
name: public_data
|
||||||
|
2
infrastructure/syncthing/env/syncthing.env
vendored
2
infrastructure/syncthing/env/syncthing.env
vendored
@ -1,2 +0,0 @@
|
|||||||
PUID=1000
|
|
||||||
PGID=1000
|
|
@ -10,6 +10,9 @@ services:
|
|||||||
- caddy
|
- caddy
|
||||||
env_file:
|
env_file:
|
||||||
- ./transmission/env/transmission.env
|
- ./transmission/env/transmission.env
|
||||||
|
environment:
|
||||||
|
- PUID=${PUID:-1000}
|
||||||
|
- PGID=${PGID:-1000}
|
||||||
volumes:
|
volumes:
|
||||||
- transmission_config:/config
|
- transmission_config:/config
|
||||||
- public_data:/downloads
|
- public_data:/downloads
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
PUID=1000
|
|
||||||
PGID=1000
|
|
||||||
TZ=Etc/UTC
|
TZ=Etc/UTC
|
||||||
USER=admin
|
USER=admin
|
||||||
PASS=4vqXCNGG09JUBe7rXkuQS8MG7ovE6Vxj
|
PASS=4vqXCNGG09JUBe7rXkuQS8MG7ovE6Vxj
|
Loading…
Reference in New Issue
Block a user