Initial commit
This commit is contained in:
13
bitwarden/docker-compose.yml
Normal file
13
bitwarden/docker-compose.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: '3'
|
||||
services:
|
||||
bitwarden:
|
||||
container_name: bitwarden
|
||||
image: bitwardenrs/server
|
||||
restart: always
|
||||
volumes:
|
||||
- ./data:/data
|
||||
expose:
|
||||
- '80'
|
||||
environment:
|
||||
WEBSOCKET_ENABLED: 'true'
|
||||
SIGNUPS_ALLOWED: 'true'
|
||||
44
gitea/docker-compose.yml
Normal file
44
gitea/docker-compose.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
version: "3"
|
||||
|
||||
networks:
|
||||
gitea:
|
||||
external:
|
||||
name: gitea
|
||||
|
||||
services:
|
||||
server:
|
||||
image: gitea/gitea:1.13.6
|
||||
container_name: gitea
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- DB_TYPE=postgres
|
||||
- DB_HOST=db:5432
|
||||
- DB_NAME=gitea
|
||||
- DB_USER=gitea
|
||||
- DB_PASSWD=gitea
|
||||
restart: always
|
||||
networks:
|
||||
- gitea
|
||||
volumes:
|
||||
- ./gitea:/data
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
expose:
|
||||
- "80"
|
||||
- "3000"
|
||||
- "22"
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: postgres:9.6
|
||||
restart: always
|
||||
environment:
|
||||
- POSTGRES_USER=gitea
|
||||
- POSTGRES_PASSWORD=gitea
|
||||
- POSTGRES_DB=gitea
|
||||
networks:
|
||||
- gitea
|
||||
volumes:
|
||||
- ./postgres:/var/lib/postgresql/data
|
||||
13
nginx-reverse-proxy/Dockerfile
Normal file
13
nginx-reverse-proxy/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM nginx:1.19.9
|
||||
|
||||
# default conf for proxy services
|
||||
COPY ./default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# NOT FOUND response
|
||||
COPY ./backend-not-found.html /var/www/html/backend-not-found.html
|
||||
|
||||
# Proxy and SSL configurations
|
||||
COPY ./includes/ /etc/nginx/includes/
|
||||
|
||||
# Proxy SSL certificates
|
||||
COPY ./ssl/ /etc/ssl/certs/nginx/
|
||||
6
nginx-reverse-proxy/backend-not-found.html
Normal file
6
nginx-reverse-proxy/backend-not-found.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<head><title>Proxy Backend Not Found</title></head>
|
||||
<body >
|
||||
<h2>Proxy Backend Not Found</h2>
|
||||
</body>
|
||||
</html>
|
||||
78
nginx-reverse-proxy/default.conf
Normal file
78
nginx-reverse-proxy/default.conf
Normal file
@@ -0,0 +1,78 @@
|
||||
# blog config
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl http2;
|
||||
server_name colindiem.com;
|
||||
|
||||
# Path for SSL config/key/certificate
|
||||
ssl_certificate /etc/ssl/certs/nginx/blog.crt;
|
||||
ssl_certificate_key /etc/ssl/certs/nginx/blog.key;
|
||||
include /etc/nginx/includes/ssl.conf;
|
||||
|
||||
location / {
|
||||
include /etc/nginx/includes/proxy.conf;
|
||||
proxy_pass http://blog;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/access.log combined;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
}
|
||||
|
||||
# Bitwarden cofig
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl http2;
|
||||
server_name bitwarden.colindiem.com;
|
||||
|
||||
ssl_certificate /etc/ssl/certs/nginx/bitwarden.crt;
|
||||
ssl_certificate_key /etc/ssl/certs/nginx/bitwarden.key;
|
||||
include /etc/nginx/includes/ssl.conf;
|
||||
|
||||
location / {
|
||||
include /etc/nginx/includes/proxy.conf;
|
||||
proxy_pass http://bitwarden;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/bitwarden-access.log combined;
|
||||
error_log /var/log/nginx/bitwarden-error.log error;
|
||||
}
|
||||
|
||||
# Gitea config
|
||||
server {
|
||||
listen 80;
|
||||
listen 3000;
|
||||
listen 22;
|
||||
server_name git.colindiem.com;
|
||||
client_max_body_size 0;
|
||||
|
||||
location / {
|
||||
include /etc/nginx/includes/proxy.conf;
|
||||
proxy_pass http://gitea:3000;
|
||||
}
|
||||
|
||||
access_log /var/log/nginx/gitea-access.log combined;
|
||||
error_log /var/log/nginx/gitea-error.log error;
|
||||
}
|
||||
|
||||
# Default
|
||||
server {
|
||||
listen 80 default_server;
|
||||
|
||||
server_name _;
|
||||
root /var/www/html;
|
||||
|
||||
charset UTF-8;
|
||||
|
||||
error_page 404 /backend-not-found.html;
|
||||
location = /backend-not-found.html {
|
||||
allow all;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 404;
|
||||
}
|
||||
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
}
|
||||
23
nginx-reverse-proxy/docker-compose.yml
Normal file
23
nginx-reverse-proxy/docker-compose.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: '2'
|
||||
services:
|
||||
proxy:
|
||||
container_name: rev-proxy
|
||||
build: ./
|
||||
networks:
|
||||
- blog
|
||||
- bitwarden
|
||||
- gitea
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
|
||||
networks:
|
||||
blog:
|
||||
external:
|
||||
name: blog_default
|
||||
bitwarden:
|
||||
external:
|
||||
name: bitwarden_default
|
||||
gitea:
|
||||
external:
|
||||
name: gitea
|
||||
8
nginx-reverse-proxy/includes/proxy.conf
Normal file
8
nginx-reverse-proxy/includes/proxy.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
proxy_set_header Host $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_buffering off;
|
||||
proxy_request_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_intercept_errors on;
|
||||
6
nginx-reverse-proxy/includes/ssl.conf
Normal file
6
nginx-reverse-proxy/includes/ssl.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_cache shared:SSL:50m;
|
||||
ssl_session_tickets off;
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
Reference in New Issue
Block a user