switched to fully self contained docker
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: tapm-gitea
|
||||
|
||||
services:
|
||||
gitea:
|
||||
image: docker.gitea.com/gitea:1.26.4-rootless
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- path: ../../.env
|
||||
required: false
|
||||
networks:
|
||||
- edge
|
||||
ports:
|
||||
- "${GITEA_SSH_PORT:-2222}:2222"
|
||||
volumes:
|
||||
- ../../config/gitea/data:/var/lib/gitea
|
||||
- ../../config/gitea/config:/etc/gitea
|
||||
environment:
|
||||
GITEA__database__DB_TYPE: sqlite3
|
||||
GITEA__database__PATH: /var/lib/gitea/data/gitea.db
|
||||
GITEA__server__DOMAIN: ${GITEA_DOMAIN}
|
||||
GITEA__server__ROOT_URL: https://${GITEA_DOMAIN}/
|
||||
GITEA__server__SSH_DOMAIN: ${GITEA_DOMAIN}
|
||||
GITEA__server__SSH_PORT: ${GITEA_SSH_PORT:-2222}
|
||||
GITEA__server__START_SSH_SERVER: "true"
|
||||
GITEA__server__SSH_LISTEN_PORT: "2222"
|
||||
GITEA__service__DISABLE_REGISTRATION: "true"
|
||||
GITEA__security__INSTALL_LOCK: "true"
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:3000/api/healthz"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
|
||||
networks:
|
||||
edge:
|
||||
external: true
|
||||
name: tapm-edge
|
||||
@@ -1,23 +0,0 @@
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name tapm.scity.us;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/tapm.scity.us/fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/ssl/tapm.scity.us/privkey.pem;
|
||||
|
||||
client_max_body_size 1100m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_http_version 1.1;
|
||||
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 https;
|
||||
proxy_connect_timeout 30s;
|
||||
proxy_send_timeout 30m;
|
||||
proxy_read_timeout 30m;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name ${BROKER_DOMAIN} ${GITEA_DOMAIN};
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 503 "TLS setup is in progress.\n";
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
|
||||
upstream broker_backend {
|
||||
zone broker_backend 64k;
|
||||
server broker:8080 resolve;
|
||||
}
|
||||
|
||||
upstream gitea_backend {
|
||||
zone gitea_backend 64k;
|
||||
server gitea:3000 resolve;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name ${BROKER_DOMAIN} ${GITEA_DOMAIN};
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
http2 on;
|
||||
server_name ${BROKER_DOMAIN};
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/${BROKER_DOMAIN}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/${BROKER_DOMAIN}/privkey.pem;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
client_max_body_size 1100m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://broker_backend;
|
||||
proxy_http_version 1.1;
|
||||
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 https;
|
||||
proxy_connect_timeout 30s;
|
||||
proxy_send_timeout 30m;
|
||||
proxy_read_timeout 30m;
|
||||
proxy_request_buffering off;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
http2 on;
|
||||
server_name ${GITEA_DOMAIN};
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/${BROKER_DOMAIN}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/${BROKER_DOMAIN}/privkey.pem;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
||||
client_max_body_size 1100m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://gitea_backend;
|
||||
proxy_http_version 1.1;
|
||||
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 https;
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user