mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2025-01-09 00:34:27 +01:00
Compare commits
No commits in common. "eab7e994860278ff02088615d85c7e5f16b0bdc7" and "bcec823b46133c833b95c0ec3fdb6a73384ab92a" have entirely different histories.
eab7e99486
...
bcec823b46
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@ -26,17 +26,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: "Update server image"
|
- name: "Update server"
|
||||||
run: make update-docker
|
run: make update
|
||||||
- name: "Build server"
|
- name: "Build server"
|
||||||
run: make build
|
run: make build
|
||||||
# - name: "Start server"
|
|
||||||
# run: make start
|
|
||||||
- name: "Stop server"
|
|
||||||
run: make stop
|
|
||||||
- name: "Down server"
|
|
||||||
run: make down
|
|
||||||
- name: "Clean server"
|
|
||||||
run: make clean
|
|
||||||
- name: "Purge server"
|
|
||||||
run: make purge
|
|
28
Makefile
28
Makefile
@ -18,56 +18,54 @@ PROFILE_CMD := $(addprefix --profile ,$(PROFILES))
|
|||||||
|
|
||||||
# gitea-runner transmission
|
# gitea-runner transmission
|
||||||
|
|
||||||
COMPOSE_FILES := $(shell find . -name 'docker-compose*.yml' -type f | sed -e 's/^/--file /')
|
COMPOSE_FILES := $(shell find docker-compose*.yml | sed -e 's/^/--file /')
|
||||||
|
|
||||||
COMPOSE_DIR := --project-directory ./infrastructure
|
|
||||||
|
|
||||||
.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_FILES) $(PROFILE_CMD) build
|
||||||
|
|
||||||
.PHONY: start
|
.PHONY: start
|
||||||
start:
|
start:
|
||||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) up -d
|
docker compose $(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_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_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_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_FILES) logs
|
||||||
|
|
||||||
.PHONY: state
|
.PHONY: state
|
||||||
state:
|
state:
|
||||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) ps
|
docker compose $(COMPOSE_FILES) ps
|
||||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) top
|
docker compose $(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_FILES) $(PROFILE_CMD) pull
|
||||||
|
|
||||||
.PHONY: update
|
.PHONY: update
|
||||||
update: update-docker
|
update: update-docker
|
||||||
git submodule update --init --recursive --remote
|
# git submodule update --init --recursive --remote
|
||||||
git pull --recurse-submodules --all --progress
|
# git pull --recurse-submodules --all --progress
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@ -75,4 +73,4 @@ clean:
|
|||||||
|
|
||||||
.PHONY: purge
|
.PHONY: purge
|
||||||
purge:
|
purge:
|
||||||
docker compose $(COMPOSE_DIR) $(COMPOSE_FILES) $(PROFILE_CMD) down -v --rmi all
|
docker compose $(COMPOSE_FILES) $(PROFILE_CMD) down -v --rmi all
|
18
README.md
18
README.md
@ -19,7 +19,7 @@ If you have any **questions** or **suggestions**, feel free to open an issue or
|
|||||||
- [x] Jellyfin (Media server)
|
- [x] Jellyfin (Media server)
|
||||||
- [x] Gitea (Git server)
|
- [x] Gitea (Git server)
|
||||||
- [x] Uptime Kuma (Monitoring)
|
- [x] Uptime Kuma (Monitoring)
|
||||||
- [x] qbittorrent and transmission (Torrent client/server)
|
- [x] qbittorrent server
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
@ -67,7 +67,6 @@ And then, caddy will generate the certificate for you and renew it automatically
|
|||||||
| [adminer.bensuperpc.org](https://adminer.bensuperpc.org) | Sub | Adminer for MariaDB for wordpress only |
|
| [adminer.bensuperpc.org](https://adminer.bensuperpc.org) | Sub | Adminer for MariaDB for wordpress only |
|
||||||
| [uptimekuma.bensuperpc.org](https://uptimekuma.bensuperpc.org) | Sub | Uptime Kuma for monitoring |
|
| [uptimekuma.bensuperpc.org](https://uptimekuma.bensuperpc.org) | Sub | Uptime Kuma for monitoring |
|
||||||
| [qbittorrent.bensuperpc.org](https://qbittorrent.bensuperpc.org) | Sub | Torrent client/server |
|
| [qbittorrent.bensuperpc.org](https://qbittorrent.bensuperpc.org) | Sub | Torrent client/server |
|
||||||
| [transmission.bensuperpc.org](https://transmission.bensuperpc.org) | Sub | Torrent client/server |
|
|
||||||
| [git.bensuperpc.org](https://git.bensuperpc.org) | Sub | Gitea for git |
|
| [git.bensuperpc.org](https://git.bensuperpc.org) | Sub | Gitea for git |
|
||||||
| [link.bensuperpc.org](https://link.bensuperpc.org) | Sub | For link shortener |
|
| [link.bensuperpc.org](https://link.bensuperpc.org) | Sub | For link shortener |
|
||||||
| [jellyfin.bensuperpc.org](https://jellyfin.bensuperpc.org) | Sub | Jellyfin for media server |
|
| [jellyfin.bensuperpc.org](https://jellyfin.bensuperpc.org) | Sub | Jellyfin for media server |
|
||||||
@ -88,7 +87,7 @@ You can generate a password with 32 characters:
|
|||||||
openssl rand -base64 32
|
openssl rand -base64 32
|
||||||
```
|
```
|
||||||
|
|
||||||
For the [wordpress.env](infrastructure/wordpress/env/wordpress.env) file, you need to change the password and user for the database.
|
For the [wordpress.env](env/wordpress.env) file, you need to change the password and user for the database.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
WORDPRESS_DB_USER=bensuperpc
|
WORDPRESS_DB_USER=bensuperpc
|
||||||
@ -97,7 +96,7 @@ WORDPRESS_DB_NAME=wordpress
|
|||||||
WORDPRESS_DB_HOST=wordpress_db:3306
|
WORDPRESS_DB_HOST=wordpress_db:3306
|
||||||
```
|
```
|
||||||
|
|
||||||
For [wordpress_db.env](infrastructure/wordpress/env/wordpress_db.env) file, you need to change the password(s) and user for the database.
|
For [wordpress_db.env](env/wordpress_db.env) file, you need to change the password(s) and user for the database.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
MARIADB_ROOT_PASSWORD=7L1Ncbquax0B2TCOmrjaQl9n5mnY88bQ
|
MARIADB_ROOT_PASSWORD=7L1Ncbquax0B2TCOmrjaQl9n5mnY88bQ
|
||||||
@ -106,7 +105,7 @@ MARIADB_PASSWORD=lEOEf8cndnDjp84O4Uv5D9zJLJDFatLw
|
|||||||
MARIADB_DATABASE=wordpress
|
MARIADB_DATABASE=wordpress
|
||||||
```
|
```
|
||||||
|
|
||||||
For [adminer.env](infrastructure/wordpress/env/adminer.env) file, you need to change the password(s) and user for the database.
|
For [adminer.env](env/adminer.env) file, you need to change the password(s) and user for the database.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
MYSQL_ROOT_PASSWORD=7L1Ncbquax0B2TCOmrjaQl9n5mnY88bQ
|
MYSQL_ROOT_PASSWORD=7L1Ncbquax0B2TCOmrjaQl9n5mnY88bQ
|
||||||
@ -115,7 +114,7 @@ MYSQL_PASSWORD=lEOEf8cndnDjp84O4Uv5D9zJLJDFatLw
|
|||||||
ADMINER_DEFAULT_SERVER=wordpress_db
|
ADMINER_DEFAULT_SERVER=wordpress_db
|
||||||
```
|
```
|
||||||
|
|
||||||
For [gitea.env](infrastructure/gitea/env/gitea.env) file, you need to change the password(s) and user for the database.
|
For [gitea.env](env/gitea.env) file, you need to change the password(s) and user for the database.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
GITEA__database__DB_TYPE=mysql
|
GITEA__database__DB_TYPE=mysql
|
||||||
@ -126,7 +125,7 @@ GITEA__database__PASSWD=K7s5yoHknnEd7vsZoxb8I3dK9mjToF1j
|
|||||||
GITEA__security__SECRET_KEY=ykcZt23an1E4lFHWvrCKdAyt16WAiK9c
|
GITEA__security__SECRET_KEY=ykcZt23an1E4lFHWvrCKdAyt16WAiK9c
|
||||||
```
|
```
|
||||||
|
|
||||||
For [gitea_db.env](infrastructure/gitea/env/gitea_db.env) file, you need to change the password(s) and user for the database.
|
For [gitea_db.env](env/gitea_db.env) file, you need to change the password(s) and user for the database.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
MYSQL_ROOT_PASSWORD=xpc4zIhHZzWKqVHcjBu4aW6aS7jG8d7X
|
MYSQL_ROOT_PASSWORD=xpc4zIhHZzWKqVHcjBu4aW6aS7jG8d7X
|
||||||
@ -135,7 +134,7 @@ MYSQL_PASSWORD=K7s5yoHknnEd7vsZoxb8I3dK9mjToF1j
|
|||||||
MYSQL_DATABASE=gitea
|
MYSQL_DATABASE=gitea
|
||||||
```
|
```
|
||||||
|
|
||||||
For [psitransfer.env](infrastructure/psitransfer/env/psitransfer.env) file, you need to change the password(s) and user for the database.
|
For [psitransfer.env](env/psitransfer.env) file, you need to change the password(s) and user for the database.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
PSITRANSFER_ADMIN_PASS=n9jLVNT9QUotTJTT91JqH4GyBTg9pvEn
|
PSITRANSFER_ADMIN_PASS=n9jLVNT9QUotTJTT91JqH4GyBTg9pvEn
|
||||||
@ -163,7 +162,7 @@ make down
|
|||||||
|
|
||||||
### All services
|
### All services
|
||||||
|
|
||||||
You can find all service on this table:
|
You can find all services on the [docker-compose.yml](docker-compose.yml) file or on this table:
|
||||||
|
|
||||||
| Service | Description | URL |
|
| Service | Description | URL |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
@ -171,7 +170,6 @@ You can find all service on this table:
|
|||||||
| Adminer | Adminer for MariaDB | [adminer.bensuperpc.org](https://adminer.bensuperpc.org) |
|
| Adminer | Adminer for MariaDB | [adminer.bensuperpc.org](https://adminer.bensuperpc.org) |
|
||||||
| Uptime Kuma | Uptime Kuma for monitoring | [uptimekuma.bensuperpc.org](https://uptimekuma.bensuperpc.org) |
|
| Uptime Kuma | Uptime Kuma for monitoring | [uptimekuma.bensuperpc.org](https://uptimekuma.bensuperpc.org) |
|
||||||
| qbittorrent | qbittorrent server | [qbittorrent.bensuperpc.org](https://qbittorrent.bensuperpc.org) |
|
| qbittorrent | qbittorrent server | [qbittorrent.bensuperpc.org](https://qbittorrent.bensuperpc.org) |
|
||||||
| transmission | transmission server | [transmission.bensuperpc.org](https://transmission.bensuperpc.org) |
|
|
||||||
| Gitea | Gitea for git | [git.bensuperpc.org](https://git.bensuperpc.org) |
|
| Gitea | Gitea for git | [git.bensuperpc.org](https://git.bensuperpc.org) |
|
||||||
| Jellyfin | Jellyfin for media server | [jellyfin.bensuperpc.org](https://jellyfin.bensuperpc.org) |
|
| Jellyfin | Jellyfin for media server | [jellyfin.bensuperpc.org](https://jellyfin.bensuperpc.org) |
|
||||||
| SyncThing | SyncThing for file synchronization | [syncthing.bensuperpc.org](https://syncthing.bensuperpc.org) |
|
| SyncThing | SyncThing for file synchronization | [syncthing.bensuperpc.org](https://syncthing.bensuperpc.org) |
|
||||||
|
@ -7,7 +7,7 @@ services:
|
|||||||
- adminer
|
- adminer
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
env_file:
|
env_file:
|
||||||
- ./wordpress/env/adminer.env
|
- env/adminer.env
|
||||||
depends_on:
|
depends_on:
|
||||||
- wordpress_db
|
- wordpress_db
|
||||||
- caddy
|
- caddy
|
@ -13,11 +13,11 @@ services:
|
|||||||
- wordpress:/var/www/html:rw
|
- wordpress:/var/www/html:rw
|
||||||
- caddy_data:/data:rw
|
- caddy_data:/data:rw
|
||||||
- caddy_config:/config:rw
|
- caddy_config:/config:rw
|
||||||
- ./caddy/config:/etc/caddy:ro
|
- ./caddy:/etc/caddy:ro
|
||||||
networks:
|
networks:
|
||||||
- infra-network
|
- infra-network
|
||||||
env_file:
|
env_file:
|
||||||
- ./caddy/env/caddy.env
|
- env/caddy.env
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
#cap_drop:
|
#cap_drop:
|
||||||
@ -35,8 +35,3 @@ volumes:
|
|||||||
name: caddy_data
|
name: caddy_data
|
||||||
caddy_config:
|
caddy_config:
|
||||||
name: caddy_config
|
name: caddy_config
|
||||||
|
|
||||||
networks:
|
|
||||||
infra-network:
|
|
||||||
driver: bridge
|
|
||||||
name: infra-network
|
|
@ -12,7 +12,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "22:22"
|
- "22:22"
|
||||||
env_file:
|
env_file:
|
||||||
- ./gitea/env/gitea.env
|
- env/gitea.env
|
||||||
volumes:
|
volumes:
|
||||||
- gitea_data:/var/lib/gitea
|
- gitea_data:/var/lib/gitea
|
||||||
- gitea_config:/etc/gitea
|
- gitea_config:/etc/gitea
|
||||||
@ -34,7 +34,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- gitea_db:/var/lib/mysql:rw
|
- gitea_db:/var/lib/mysql:rw
|
||||||
env_file:
|
env_file:
|
||||||
- ./gitea/env/gitea_db.env
|
- env/gitea_db.env
|
||||||
command: '--default-authentication-plugin=mysql_native_password'
|
command: '--default-authentication-plugin=mysql_native_password'
|
||||||
networks:
|
networks:
|
||||||
- infra-network
|
- infra-network
|
||||||
@ -51,11 +51,11 @@ services:
|
|||||||
- gitea
|
- gitea
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
env_file:
|
env_file:
|
||||||
- ./gitea/env/gitea-runner.env
|
- env/gitea-runner.env
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- gitea_runner:/data
|
- gitea_runner:/data
|
||||||
- ./gitea/config/gitea_runner/config.yaml:/config.yaml:ro
|
- ./config/gitea_runner/config.yaml:/config.yaml:ro
|
||||||
networks:
|
networks:
|
||||||
- infra-network
|
- infra-network
|
||||||
security_opt:
|
security_opt:
|
@ -8,8 +8,6 @@ services:
|
|||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
depends_on:
|
depends_on:
|
||||||
- caddy
|
- caddy
|
||||||
env_file:
|
|
||||||
- ./jellyfin/env/jellyfin.env
|
|
||||||
volumes:
|
volumes:
|
||||||
- jellyfin_config:/config
|
- jellyfin_config:/config
|
||||||
- jellyfin_data_movies:/movies:rw
|
- jellyfin_data_movies:/movies:rw
|
4
docker-compose.networks.yml
Normal file
4
docker-compose.networks.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
networks:
|
||||||
|
infra-network:
|
||||||
|
driver: bridge
|
||||||
|
name: infra-network
|
@ -9,7 +9,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- caddy
|
- caddy
|
||||||
env_file:
|
env_file:
|
||||||
- ./psitransfer/env/psitransfer.env
|
- env/psitransfer.env
|
||||||
volumes:
|
volumes:
|
||||||
- psitransfer_data:/data
|
- psitransfer_data:/data
|
||||||
networks:
|
networks:
|
@ -9,7 +9,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- caddy
|
- caddy
|
||||||
env_file:
|
env_file:
|
||||||
- ./qbittorrent/env/qbittorrent.env
|
- env/qbittorrent.env
|
||||||
volumes:
|
volumes:
|
||||||
- qbittorrent_config:/config
|
- qbittorrent_config:/config
|
||||||
- qbittorrent_data:/downloads
|
- qbittorrent_data:/downloads
|
@ -9,7 +9,7 @@ services:
|
|||||||
- caddy
|
- caddy
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
env_file:
|
env_file:
|
||||||
- ./syncthing/env/syncthing.env
|
- env/syncthing.env
|
||||||
volumes:
|
volumes:
|
||||||
- syncthing_config:/config
|
- syncthing_config:/config
|
||||||
- syncthing_data:/data1
|
- syncthing_data:/data1
|
@ -9,7 +9,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- caddy
|
- caddy
|
||||||
env_file:
|
env_file:
|
||||||
- ./transmission/env/transmission.env
|
- env/transmission.env
|
||||||
volumes:
|
volumes:
|
||||||
- transmission_config:/config
|
- transmission_config:/config
|
||||||
- transmission_data:/downloads
|
- transmission_data:/downloads
|
@ -14,7 +14,3 @@ services:
|
|||||||
- infra-network
|
- infra-network
|
||||||
security_opt:
|
security_opt:
|
||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
|
|
||||||
volumes:
|
|
||||||
uptimekuma_data:
|
|
||||||
name: uptimekuma_data
|
|
3
docker-compose.volumes.yml
Normal file
3
docker-compose.volumes.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
volumes:
|
||||||
|
uptimekuma_data:
|
||||||
|
name: uptimekuma_data
|
@ -10,9 +10,9 @@ services:
|
|||||||
- wordpress_db
|
- wordpress_db
|
||||||
- caddy
|
- caddy
|
||||||
env_file:
|
env_file:
|
||||||
- ./wordpress/env/wordpress.env
|
- env/wordpress.env
|
||||||
volumes:
|
volumes:
|
||||||
- ./wordpress/config/wordpress/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro
|
- ./config/wordpress/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro
|
||||||
- wordpress:/var/www/html:rw
|
- wordpress:/var/www/html:rw
|
||||||
networks:
|
networks:
|
||||||
- infra-network
|
- infra-network
|
||||||
@ -32,7 +32,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- wordpress_db:/var/lib/mysql:rw
|
- wordpress_db:/var/lib/mysql:rw
|
||||||
env_file:
|
env_file:
|
||||||
- ./wordpress/env/wordpress_db.env
|
- env/wordpress_db.env
|
||||||
command: '--default-authentication-plugin=mysql_native_password'
|
command: '--default-authentication-plugin=mysql_native_password'
|
||||||
networks:
|
networks:
|
||||||
- infra-network
|
- infra-network
|
||||||
@ -48,7 +48,7 @@ services:
|
|||||||
- wordpress
|
- wordpress
|
||||||
restart: on-failure:5
|
restart: on-failure:5
|
||||||
env_file:
|
env_file:
|
||||||
- ./wordpress/env/backup.env
|
- env/backup.env
|
||||||
volumes:
|
volumes:
|
||||||
- wordpress_backup:/mnt/restic
|
- wordpress_backup:/mnt/restic
|
||||||
- wordpress_db:/data/wordpress_db:ro
|
- wordpress_db:/data/wordpress_db:ro
|
Loading…
x
Reference in New Issue
Block a user