Compare commits
8 Commits
d59ed1c749
...
sepia
| Author | SHA1 | Date | |
|---|---|---|---|
| efaefe12e8 | |||
| 5d7fc719a6 | |||
| 1854e15c62 | |||
| 3ace2a993f | |||
| f2e1c4cd62 | |||
| da288fc5d4 | |||
| 6208982bde | |||
| 7c70cc7760 |
@@ -12,10 +12,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
uitgeest.veenboer.xyz {
|
||||
reverse_proxy nginx
|
||||
}
|
||||
import unprotected ha host:8123
|
||||
import unprotected seafile host:8082
|
||||
|
||||
(protected) {
|
||||
{args[0]}.{$SUBDOMAIN}.{$DOMAIN} {
|
||||
|
||||
@@ -12,10 +12,10 @@ services:
|
||||
- OAUTH_CLIENT_ID=${OAUTH_CLIENT_ID:?}
|
||||
- OAUTH_CLIENT_SECRET=${OAUTH_CLIENT_SECRET:?}
|
||||
image: caddy
|
||||
links:
|
||||
- nginx
|
||||
# links:
|
||||
# - nginx
|
||||
ports:
|
||||
- 444:443
|
||||
- 443:443
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /opt/caddy/Caddyfile:/etc/caddy/Caddyfile
|
||||
67
compose.seafile.yaml
Normal file
67
compose.seafile.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
services:
|
||||
seafile-mysql:
|
||||
image: mariadb:11.8.5
|
||||
container_name: seafile-mysql
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=ROOT_PASSWORD
|
||||
- MYSQL_LOG_CONSOLE=true
|
||||
- MARIADB_AUTO_UPGRADE=1
|
||||
volumes:
|
||||
- /opt/seafile/database:/var/lib/mysql
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"/usr/local/bin/healthcheck.sh",
|
||||
"--connect",
|
||||
"--mariadbupgrade",
|
||||
"--innodb_initialized",
|
||||
]
|
||||
interval: 20s
|
||||
start_period: 30s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
seafile-redis:
|
||||
image: redis:8.4.0
|
||||
container_name: seafile-redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- redis-server --requirepass "$$REDIS_PASSWORD"
|
||||
environment:
|
||||
- REDIS_PASSWORD=PASSWORD
|
||||
|
||||
seafile-server:
|
||||
image: seafileltd/seafile-mc:13.0-latest
|
||||
container_name: seafile-server
|
||||
ports:
|
||||
- "8082:80"
|
||||
volumes:
|
||||
- /opt/seafile/server:/shared/seafile
|
||||
- /media/seafile:/shared/seafile/seafile-data
|
||||
environment:
|
||||
- DB_HOST=seafile-mysql
|
||||
- DB_PORT=3306
|
||||
- DB_ROOT_PASSWD=ROOT_PASSWORD
|
||||
- DB_PASSWORD=PASSWORD
|
||||
- TIME_ZONE=Europe/Amsterdam
|
||||
- JWT_PRIVATE_KEY=F23HhfNSNxPsDNB9UaGFLbfNku4F7DPB
|
||||
- SEAFILE_SERVER_HOSTNAME=seafile.uitgeest.veenboer.xyz
|
||||
- SEAFILE_SERVER_PROTOCOL=https
|
||||
- SEAFILE_MYSQL_DB_PORT=3306
|
||||
- SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=seafile_db
|
||||
- SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=seahub_db
|
||||
- SEAFILE_MYSQL_DB_CCNET_DB_NAME=ccnet_db
|
||||
- SEAFILE_MYSQL_DB_HOST=seafile-mysql
|
||||
- SEAFILE_MYSQL_DB_USER=seafile
|
||||
- SEAFILE_MYSQL_DB_PASSWORD=seafile
|
||||
- REDIS_HOST=seafile-redis
|
||||
- REDIS_PORT=6379
|
||||
- REDIS_PASSWORD=PASSWORD
|
||||
depends_on:
|
||||
- seafile-mysql
|
||||
- seafile-redis
|
||||
21
compose.yaml
Normal file
21
compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
include:
|
||||
# Web
|
||||
- compose.caddy.yaml
|
||||
|
||||
# Networking
|
||||
- compose.dns-ad-blocker.yaml
|
||||
|
||||
# Backup
|
||||
- compose.borgmatic.yaml
|
||||
|
||||
# Storage
|
||||
- compose.seafile.yaml
|
||||
- compose.collectd.yaml
|
||||
|
||||
# Sensors
|
||||
- compose.esphome.yaml
|
||||
|
||||
# Other
|
||||
- compose.homeassistant.yaml
|
||||
- compose.timescaledb.yaml
|
||||
- compose.grafana.yaml
|
||||
@@ -1,13 +0,0 @@
|
||||
services:
|
||||
nginx:
|
||||
container_name: nginx
|
||||
extra_hosts:
|
||||
- host:192.168.2.150
|
||||
image: nginx:1.25.4
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /opt/nginx/etc/.htpasswd:/host/etc/.htpasswd
|
||||
- /opt/nginx/etc/nginx/conf:/etc/nginx/conf
|
||||
- /opt/nginx/etc/nginx/conf.d:/etc/nginx/conf.d
|
||||
- /opt/nginx/var/log/nginx:/var/log/nginx
|
||||
- /opt/seafile/seafile-server-latest/seahub/media:/host/var/www/seafile
|
||||
@@ -1,15 +0,0 @@
|
||||
services:
|
||||
openvpn-server:
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
container_name: openvpn-server
|
||||
extra_hosts:
|
||||
- host:192.168.2.150
|
||||
image: kylemanna/openvpn:2.4
|
||||
network_mode: bridge
|
||||
ports:
|
||||
- 443:443
|
||||
privileged: true
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /opt/openvpn-server:/etc/openvpn
|
||||
@@ -1,13 +0,0 @@
|
||||
services:
|
||||
seafile:
|
||||
container_name: seafile
|
||||
environment:
|
||||
- MODE=autorun
|
||||
image: gronis/seafile:9.0.4
|
||||
ports:
|
||||
- 8000:8000
|
||||
- 8082:8082
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /opt/seafile:/seafile:rw
|
||||
- /media/seafile:/seafile/seafile-data:rw
|
||||
@@ -1,23 +0,0 @@
|
||||
include:
|
||||
# Web
|
||||
- docker-compose.nginx.yaml
|
||||
- docker-compose.caddy.yaml
|
||||
|
||||
# Networking
|
||||
- docker-compose.dns-ad-blocker.yaml
|
||||
- docker-compose.openvpn-server.yaml
|
||||
|
||||
# Backup
|
||||
- docker-compose.borgmatic.yaml
|
||||
|
||||
# Storage
|
||||
- docker-compose.seafile.yaml
|
||||
- docker-compose.collectd.yaml
|
||||
|
||||
# Sensors
|
||||
- docker-compose.esphome.yaml
|
||||
|
||||
# Other
|
||||
- docker-compose.homeassistant.yaml
|
||||
- docker-compose.timescaledb.yaml
|
||||
- docker-compose.grafana.yaml
|
||||
@@ -1 +0,0 @@
|
||||
user:$apr1$PUlYgSSM$cZbvFGsKVt4SsAsB5Bifr1
|
||||
@@ -1,27 +0,0 @@
|
||||
log_format seafileformat '$http_x_forwarded_for $remote_addr [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $upstream_response_time';
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
location /seafile {
|
||||
proxy_pass http://host:8000;
|
||||
include /etc/nginx/conf/proxy.conf;
|
||||
}
|
||||
location /seafhttp {
|
||||
rewrite ^/seafhttp(.*)$ $1 break;
|
||||
proxy_pass http://host:8082;
|
||||
client_max_body_size 0;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_connect_timeout 36000s;
|
||||
proxy_read_timeout 36000s;
|
||||
proxy_send_timeout 36000s;
|
||||
send_timeout 36000s;
|
||||
|
||||
access_log /var/log/nginx/seafhttp.access.log seafileformat;
|
||||
error_log /var/log/nginx/seafhttp.error.log;
|
||||
}
|
||||
location /seafmedia {
|
||||
rewrite ^/seafmedia(.*)$ $1 break;
|
||||
root /host/var/www/seafile;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
# Proxy
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
|
||||
# Websocket
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
@@ -1,21 +0,0 @@
|
||||
# Enable SSL
|
||||
ssl_certificate /host/etc/certs/certificate+intermediate.pem;
|
||||
ssl_certificate_key /host/etc/certs/key.pem;
|
||||
ssl_dhparam /host/etc/certs/dh.pem;
|
||||
|
||||
# Increased security, from https://cipherli.st/
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
|
||||
ssl_ecdh_curve secp384r1;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_session_tickets off;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
resolver_timeout 5s;
|
||||
# add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
|
||||
add_header X-Frame-Options DENY;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
|
||||
# Redirect HTTP trafic
|
||||
error_page 497 https://$host:$server_port$request_uri;
|
||||
@@ -1,31 +0,0 @@
|
||||
server 192.168.255.0 255.255.255.0
|
||||
verb 3
|
||||
key /etc/openvpn/pki/private/herderin.veenboer.xyz.key
|
||||
ca /etc/openvpn/pki/ca.crt
|
||||
cert /etc/openvpn/pki/issued/herderin.veenboer.xyz.crt
|
||||
dh /etc/openvpn/pki/dh.pem
|
||||
tls-auth /etc/openvpn/pki/ta.key
|
||||
key-direction 0
|
||||
keepalive 10 60
|
||||
persist-key
|
||||
persist-tun
|
||||
|
||||
proto tcp
|
||||
# Rely on Docker to do port mapping, internally always 1194
|
||||
port 443
|
||||
dev tun0
|
||||
status /tmp/openvpn-status.log
|
||||
|
||||
user nobody
|
||||
group nogroup
|
||||
comp-lzo no
|
||||
|
||||
### Route Configurations Below
|
||||
route 192.168.254.0 255.255.255.0
|
||||
|
||||
### Push Configurations Below
|
||||
push "block-outside-dns"
|
||||
push "dhcp-option DNS 192.168.2.150"
|
||||
push "comp-lzo no"
|
||||
|
||||
port-share host 444
|
||||
@@ -1,25 +0,0 @@
|
||||
declare -x OVPN_AUTH=
|
||||
declare -x OVPN_CIPHER=
|
||||
declare -x OVPN_CLIENT_TO_CLIENT=
|
||||
declare -x OVPN_CN=herderin.veenboer.xyz
|
||||
declare -x OVPN_COMP_LZO=0
|
||||
declare -x OVPN_DEFROUTE=1
|
||||
declare -x OVPN_DEVICE=tun
|
||||
declare -x OVPN_DEVICEN=0
|
||||
declare -x OVPN_DISABLE_PUSH_BLOCK_DNS=0
|
||||
declare -x OVPN_DNS=1
|
||||
declare -x OVPN_DNS_SERVERS=([0]="8.8.8.8" [1]="8.8.4.4")
|
||||
declare -x OVPN_ENV=/etc/openvpn/ovpn_env.sh
|
||||
declare -x OVPN_EXTRA_CLIENT_CONFIG=()
|
||||
declare -x OVPN_EXTRA_SERVER_CONFIG=()
|
||||
declare -x OVPN_FRAGMENT=
|
||||
declare -x OVPN_KEEPALIVE='10 60'
|
||||
declare -x OVPN_MTU=
|
||||
declare -x OVPN_NAT=0
|
||||
declare -x OVPN_PORT=1194
|
||||
declare -x OVPN_PROTO=tcp
|
||||
declare -x OVPN_PUSH=()
|
||||
declare -x OVPN_ROUTES=([0]="192.168.254.0/24")
|
||||
declare -x OVPN_SERVER=192.168.255.0/24
|
||||
declare -x OVPN_SERVER_URL=tcp://herderin.veenboer.xyz
|
||||
declare -x OVPN_TLS_CIPHER=
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
OVPN_DATA=/opt/openvpn-server
|
||||
VERSION=2.4
|
||||
CLIENTNAME=herderin
|
||||
docker run -v /$OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn:$VERSION ovpn_genconfig -u tcp://$CLIENTNAME.veenboer.xyz
|
||||
docker run -v /$OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn:$VERSION ovpn_initpki
|
||||
docker run -v /$OVPN_DATA:/etc/openvpn -d -p 443:443/tcp --cap-add=NET_ADMIN kylemanna/openvpn:$VERSION
|
||||
docker run -v /$OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn easyrsa build-client-full $CLIENTNAME nopass
|
||||
docker run -v /$OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn:$VERSION ovpn_getclient $CLIENTNAME > $CLIENTNAME.ovpn
|
||||
@@ -1,3 +0,0 @@
|
||||
[General]
|
||||
SERVICE_URL = https://herderin.veenboer.xyz/seafile
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/seafile/conf
|
||||
@@ -1,16 +0,0 @@
|
||||
import os
|
||||
|
||||
daemon = True
|
||||
workers = 5
|
||||
|
||||
# default localhost:8000
|
||||
bind = "0.0.0.0:8000"
|
||||
|
||||
# Pid
|
||||
pids_dir = '/opt/haiwen/pids'
|
||||
pidfile = os.path.join(pids_dir, 'seahub.pid')
|
||||
|
||||
# for file upload, we need a longer timeout value (default is only 30s, too short)
|
||||
timeout = 1200
|
||||
|
||||
limit_request_line = 8190
|
||||
@@ -1,3 +0,0 @@
|
||||
[fileserver]
|
||||
port=8082
|
||||
max_download_dir_size=8192
|
||||
@@ -1,10 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
SECRET_KEY = "by-t3pizx0b7b^x#4q8be4b@4n1g8vxle#bl@+gq8*x!2jt*g7"
|
||||
SERVE_STATIC = False
|
||||
MEDIA_URL = '/seafmedia/'
|
||||
COMPRESS_URL = MEDIA_URL
|
||||
STATIC_URL = MEDIA_URL + 'assets/'
|
||||
SITE_ROOT = '/seafile/'
|
||||
LOGIN_URL = '/seafile/accounts/login/'
|
||||
FILE_SERVER_ROOT = 'https://herderin.veenboer.xyz/seafhttp'
|
||||
SERVICE_URL = 'https://herderin.veenboer.xyz/seafile'
|
||||
@@ -1 +0,0 @@
|
||||
9.0.4
|
||||
Reference in New Issue
Block a user