mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2024-12-22 00:34:26 +01:00
Rework project structure
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
bcec823b46
commit
927522a5a8
24
Makefile
24
Makefile
@ -18,49 +18,51 @@ PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
|
||||
|
||||
# gitea-runner transmission
|
||||
|
||||
COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /')
|
||||
COMPOSE_FILES := $(shell find . -name 'docker-compose*.yml' -type f | sed -e 's/^/--file /')
|
||||
|
||||
COMPOSE_DIR := --project-directory ./infrastructure
|
||||
|
||||
.PHONY: build all
|
||||
all: start
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) build
|
||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) build
|
||||
|
||||
.PHONY: start
|
||||
start:
|
||||
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) up -d
|
||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) up -d
|
||||
|
||||
.PHONY: start-at
|
||||
start-at:
|
||||
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) up
|
||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) up
|
||||
|
||||
.PHONY: docker-check
|
||||
docker-check:
|
||||
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) config
|
||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) config
|
||||
|
||||
.PHONY: stop
|
||||
stop: down
|
||||
|
||||
.PHONY: down
|
||||
down:
|
||||
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) down
|
||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down
|
||||
|
||||
.PHONY: restart
|
||||
restart: stop start
|
||||
|
||||
.PHONY: logs
|
||||
logs:
|
||||
docker compose $(COMPOSE_FILES) logs
|
||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) logs
|
||||
|
||||
.PHONY: state
|
||||
state:
|
||||
docker compose $(COMPOSE_FILES) ps
|
||||
docker compose $(COMPOSE_FILES) top
|
||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) ps
|
||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) top
|
||||
|
||||
.PHONY: update-docker
|
||||
update-docker:
|
||||
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) pull
|
||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) pull
|
||||
|
||||
.PHONY: update
|
||||
update: update-docker
|
||||
@ -73,4 +75,4 @@ clean:
|
||||
|
||||
.PHONY: purge
|
||||
purge:
|
||||
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) down -v --rmi all
|
||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down -v --rmi all
|
@ -1,4 +0,0 @@
|
||||
networks:
|
||||
infra-network:
|
||||
driver: bridge
|
||||
name: infra-network
|
@ -1,3 +0,0 @@
|
||||
volumes:
|
||||
uptimekuma_data:
|
||||
name: uptimekuma_data
|
@ -13,11 +13,11 @@ services:
|
||||
- wordpress:/var/www/html:rw
|
||||
- caddy_data:/data:rw
|
||||
- caddy_config:/config:rw
|
||||
- ./caddy:/etc/caddy:ro
|
||||
- ./caddy/config:/etc/caddy:ro
|
||||
networks:
|
||||
- infra-network
|
||||
env_file:
|
||||
- env/caddy.env
|
||||
- ./caddy/env/caddy.env
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
#cap_drop:
|
||||
@ -35,3 +35,8 @@ volumes:
|
||||
name: caddy_data
|
||||
caddy_config:
|
||||
name: caddy_config
|
||||
|
||||
networks:
|
||||
infra-network:
|
||||
driver: bridge
|
||||
name: infra-network
|
@ -12,7 +12,7 @@ services:
|
||||
ports:
|
||||
- "22:22"
|
||||
env_file:
|
||||
- env/gitea.env
|
||||
- ./gitea/env/gitea.env
|
||||
volumes:
|
||||
- gitea_data:/var/lib/gitea
|
||||
- gitea_config:/etc/gitea
|
||||
@ -34,7 +34,7 @@ services:
|
||||
volumes:
|
||||
- gitea_db:/var/lib/mysql:rw
|
||||
env_file:
|
||||
- env/gitea_db.env
|
||||
- ./gitea/env/gitea_db.env
|
||||
command: '--default-authentication-plugin=mysql_native_password'
|
||||
networks:
|
||||
- infra-network
|
||||
@ -51,11 +51,11 @@ services:
|
||||
- gitea
|
||||
restart: on-failure:5
|
||||
env_file:
|
||||
- env/gitea-runner.env
|
||||
- ./gitea/env/gitea-runner.env
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- gitea_runner:/data
|
||||
- ./config/gitea_runner/config.yaml:/config.yaml:ro
|
||||
- ./gitea/config/gitea_runner/config.yaml:/config.yaml:ro
|
||||
networks:
|
||||
- infra-network
|
||||
security_opt:
|
@ -8,6 +8,8 @@ services:
|
||||
restart: on-failure:5
|
||||
depends_on:
|
||||
- caddy
|
||||
env_file:
|
||||
- ./jellyfin/env/jellyfin.env
|
||||
volumes:
|
||||
- jellyfin_config:/config
|
||||
- jellyfin_data_movies:/movies:rw
|
0
infrastructure/jellyfin/env/jellyfin.env
vendored
Normal file
0
infrastructure/jellyfin/env/jellyfin.env
vendored
Normal file
@ -9,7 +9,7 @@ services:
|
||||
depends_on:
|
||||
- caddy
|
||||
env_file:
|
||||
- env/psitransfer.env
|
||||
- ./psitransfer/env/psitransfer.env
|
||||
volumes:
|
||||
- psitransfer_data:/data
|
||||
networks:
|
@ -9,7 +9,7 @@ services:
|
||||
depends_on:
|
||||
- caddy
|
||||
env_file:
|
||||
- env/qbittorrent.env
|
||||
- ./qbittorrent/env/qbittorrent.env
|
||||
volumes:
|
||||
- qbittorrent_config:/config
|
||||
- qbittorrent_data:/downloads
|
@ -9,7 +9,7 @@ services:
|
||||
- caddy
|
||||
restart: on-failure:5
|
||||
env_file:
|
||||
- env/syncthing.env
|
||||
- ./syncthing/env/syncthing.env
|
||||
volumes:
|
||||
- syncthing_config:/config
|
||||
- syncthing_data:/data1
|
@ -9,7 +9,7 @@ services:
|
||||
depends_on:
|
||||
- caddy
|
||||
env_file:
|
||||
- env/transmission.env
|
||||
- ./transmission/env/transmission.env
|
||||
volumes:
|
||||
- transmission_config:/config
|
||||
- transmission_data:/downloads
|
@ -14,3 +14,7 @@ services:
|
||||
- infra-network
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
volumes:
|
||||
uptimekuma_data:
|
||||
name: uptimekuma_data
|
@ -7,7 +7,7 @@ services:
|
||||
- adminer
|
||||
restart: on-failure:5
|
||||
env_file:
|
||||
- env/adminer.env
|
||||
- ./wordpress/env/adminer.env
|
||||
depends_on:
|
||||
- wordpress_db
|
||||
- caddy
|
@ -10,9 +10,9 @@ services:
|
||||
- wordpress_db
|
||||
- caddy
|
||||
env_file:
|
||||
- env/wordpress.env
|
||||
- ./wordpress/env/wordpress.env
|
||||
volumes:
|
||||
- ./config/wordpress/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro
|
||||
- ./wordpress/config/wordpress/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro
|
||||
- wordpress:/var/www/html:rw
|
||||
networks:
|
||||
- infra-network
|
||||
@ -32,7 +32,7 @@ services:
|
||||
volumes:
|
||||
- wordpress_db:/var/lib/mysql:rw
|
||||
env_file:
|
||||
- env/wordpress_db.env
|
||||
- ./wordpress/env/wordpress_db.env
|
||||
command: '--default-authentication-plugin=mysql_native_password'
|
||||
networks:
|
||||
- infra-network
|
||||
@ -48,7 +48,7 @@ services:
|
||||
- wordpress
|
||||
restart: on-failure:5
|
||||
env_file:
|
||||
- env/backup.env
|
||||
- ./wordpress/env/backup.env
|
||||
volumes:
|
||||
- wordpress_backup:/mnt/restic
|
||||
- wordpress_db:/data/wordpress_db:ro
|
Loading…
Reference in New Issue
Block a user