mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2024-12-22 08:44:28 +01:00
Add torrent and fix issues
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
20d8f9efb7
commit
a621691c65
2
Makefile
2
Makefile
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
DOCKER := docker
|
DOCKER := docker
|
||||||
|
|
||||||
PROFILE := db wordpress webserver certbot phpmyadmin flask
|
PROFILE := db wordpress webserver certbot phpmyadmin flask_website qbittorrent
|
||||||
PROFILE_CMD := $(addprefix --profile ,$(PROFILE))
|
PROFILE_CMD := $(addprefix --profile ,$(PROFILE))
|
||||||
|
|
||||||
COMPOSE_FILE := docker-compose.yml
|
COMPOSE_FILE := docker-compose.yml
|
||||||
|
@ -1,49 +1,6 @@
|
|||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
db:
|
|
||||||
image: mariadb:10.10.2
|
|
||||||
container_name: db
|
|
||||||
profiles:
|
|
||||||
- db
|
|
||||||
restart: unless-stopped
|
|
||||||
env_file: .env
|
|
||||||
volumes:
|
|
||||||
- dbdata:/var/lib/mysql
|
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
|
|
||||||
wordpress:
|
|
||||||
depends_on:
|
|
||||||
- db
|
|
||||||
image: wordpress:6.1.1-php8.1-fpm
|
|
||||||
container_name: wordpress
|
|
||||||
profiles:
|
|
||||||
- wordpress
|
|
||||||
restart: unless-stopped
|
|
||||||
env_file: .env
|
|
||||||
environment:
|
|
||||||
- WORDPRESS_DB_HOST=db:3306
|
|
||||||
- WORDPRESS_DB_USER=$MARIADB_USER
|
|
||||||
- WORDPRESS_DB_PASSWORD=$MARIADB_PASSWORD
|
|
||||||
- WORDPRESS_DB_NAME=$MARIADB_DATABASE
|
|
||||||
volumes:
|
|
||||||
- wordpress:/var/www/html
|
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
|
|
||||||
flask_website:
|
|
||||||
build:
|
|
||||||
context: ./flask
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
container_name: flask_website
|
|
||||||
profiles:
|
|
||||||
- flask
|
|
||||||
volumes:
|
|
||||||
- ./flask:/app:rw
|
|
||||||
restart: unless-stopped
|
|
||||||
networks:
|
|
||||||
- app-network
|
|
||||||
webserver:
|
webserver:
|
||||||
depends_on:
|
depends_on:
|
||||||
- wordpress
|
- wordpress
|
||||||
@ -61,7 +18,71 @@ services:
|
|||||||
- certbot-etc:/etc/letsencrypt:ro
|
- certbot-etc:/etc/letsencrypt:ro
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
db:
|
||||||
|
image: mariadb:10.10.2
|
||||||
|
container_name: db
|
||||||
|
profiles:
|
||||||
|
- db
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
volumes:
|
||||||
|
- dbdata:/var/lib/mysql
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
|
||||||
|
wordpress:
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
image: wordpress:6.1.1-php8.1-fpm
|
||||||
|
container_name: wordpress
|
||||||
|
profiles:
|
||||||
|
- wordpress
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
environment:
|
||||||
|
- WORDPRESS_DB_HOST=db:3306
|
||||||
|
- WORDPRESS_DB_USER=$MARIADB_USER
|
||||||
|
- WORDPRESS_DB_PASSWORD=$MARIADB_PASSWORD
|
||||||
|
- WORDPRESS_DB_NAME=$MARIADB_DATABASE
|
||||||
|
volumes:
|
||||||
|
- wordpress:/var/www/html
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
|
||||||
|
flask_website:
|
||||||
|
build:
|
||||||
|
context: ./flask
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: flask_website
|
||||||
|
profiles:
|
||||||
|
- flask_website
|
||||||
|
volumes:
|
||||||
|
- ./flask:/app:rw
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
qbittorrent:
|
||||||
|
image: lscr.io/linuxserver/qbittorrent:latest
|
||||||
|
container_name: qbittorrent
|
||||||
|
profiles:
|
||||||
|
- qbittorrent
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/London
|
||||||
|
- WEBUI_PORT=8080
|
||||||
|
#volumes:
|
||||||
|
# - /path/to/appdata/config:/config
|
||||||
|
# - /path/to/downloads:/downloads
|
||||||
|
#ports:
|
||||||
|
# - 8080:8080
|
||||||
|
# - 6881:6881
|
||||||
|
# - 6881:6881/udp
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
certbot:
|
certbot:
|
||||||
depends_on:
|
depends_on:
|
||||||
- webserver
|
- webserver
|
||||||
@ -81,7 +102,8 @@ services:
|
|||||||
profiles:
|
profiles:
|
||||||
- phpmyadmin
|
- phpmyadmin
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
env_file: .env
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD
|
- MYSQL_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD
|
||||||
- MYSQL_USER=$MARIADB_USER
|
- MYSQL_USER=$MARIADB_USER
|
||||||
@ -92,10 +114,14 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
volumes:
|
volumes:
|
||||||
certbot-etc: {}
|
certbot-etc:
|
||||||
wordpress: {}
|
name: certbot-etc
|
||||||
dbdata: {}
|
wordpress:
|
||||||
|
name: wordpress
|
||||||
|
dbdata:
|
||||||
|
name: dbdata
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
app-network:
|
app-network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
name: app-network
|
@ -2,7 +2,7 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
|
||||||
server_name bensuperpc.org www.bensuperpc.org;
|
server_name your_domain www.your_domain;
|
||||||
|
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
@ -41,4 +41,4 @@ server {
|
|||||||
expires max;
|
expires max;
|
||||||
log_not_found off;
|
log_not_found off;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
include /etc/nginx/conf.d/sub/cache-proxy.conf;
|
#include /etc/nginx/conf.d/sub/cache-proxy.conf;
|
||||||
|
|
||||||
upstream phpmyadmin_server {
|
upstream phpmyadmin_server {
|
||||||
# ip_hash;
|
# ip_hash;
|
||||||
@ -20,23 +20,27 @@ server {
|
|||||||
location / {
|
location / {
|
||||||
proxy_pass http://phpmyadmin_server;
|
proxy_pass http://phpmyadmin_server;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header X-Forwarded-Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
#proxy_set_header Host $host;
|
||||||
proxy_set_header X-Forwarded-Server $host;
|
#proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
#proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
#proxy_set_header X-Forwarded-Host $host:$server_port;
|
||||||
|
#proxy_set_header X-Forwarded-Server $host;
|
||||||
|
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
proxy_cache PROXY;
|
# Uncomment if you want to enable proxy cache
|
||||||
proxy_cache_valid 200 302 10m;
|
#proxy_cache PROXY;
|
||||||
proxy_cache_valid 301 1h;
|
#proxy_cache_valid 200 302 10m;
|
||||||
proxy_cache_valid any 1m;
|
#proxy_cache_valid 301 1h;
|
||||||
proxy_cache_lock on;
|
#proxy_cache_valid any 1m;
|
||||||
|
#proxy_cache_lock on;
|
||||||
|
|
||||||
proxy_ignore_headers Vary;
|
#proxy_ignore_headers Vary;
|
||||||
proxy_hide_header Vary;
|
#proxy_hide_header Vary;
|
||||||
|
|
||||||
add_header X-cache $upstream_cache_status;
|
#add_header X-cache $upstream_cache_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
# resolver 8.8.8.8;
|
# resolver 8.8.8.8;
|
||||||
|
27
nginx-conf/qbittorrent.conf
Normal file
27
nginx-conf/qbittorrent.conf
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
upstream qbittorrent_server {
|
||||||
|
# ip_hash;
|
||||||
|
server qbittorrent:8080;
|
||||||
|
# server qbittorrent:8080 weight=1 max_fails=3 fail_timeout=30s;
|
||||||
|
}
|
||||||
|
|
||||||
|
# PHPmyadmin
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
#listen 443;
|
||||||
|
#listen [::]:443;
|
||||||
|
|
||||||
|
server_name qbittorrent.bensuperpc.org www.qbittorrent.bensuperpc.org;
|
||||||
|
|
||||||
|
include /etc/nginx/conf.d/sub/gzip.conf;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://qbittorrent_server;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_set_header X-Forwarded-Host $http_host;
|
||||||
|
#proxy_set_header X-Forwarded-Host $host:$server_port;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
}
|
||||||
|
|
||||||
|
# resolver 8.8.8.8;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user