Compare commits
6 Commits
e1a93b3c09
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| ee1fbd9e46 | |||
| aa1770127a | |||
| 37a8d9f996 | |||
| cdfa8aa192 | |||
| 79f1856e4d | |||
|
|
46756b7a66 |
@@ -178,7 +178,7 @@ services:
|
|||||||
order: start-first
|
order: start-first
|
||||||
|
|
||||||
gitea:
|
gitea:
|
||||||
image: gitea/gitea:1.24.6
|
image: gitea/gitea:1.25
|
||||||
networks:
|
networks:
|
||||||
- postgres
|
- postgres
|
||||||
volumes:
|
volumes:
|
||||||
@@ -196,6 +196,8 @@ services:
|
|||||||
GITEA__database__NAME: gitea
|
GITEA__database__NAME: gitea
|
||||||
GITEA__database__USER: postgres
|
GITEA__database__USER: postgres
|
||||||
GITEA__database__PASSWD: $DB_PASSWORD_PROD
|
GITEA__database__PASSWD: $DB_PASSWORD_PROD
|
||||||
|
GITEA__service__DISABLE_REGISTRATION: "true"
|
||||||
|
GITEA__server__ROOT_URL: "https://gitea.chocomarsh.com/"
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
placement:
|
placement:
|
||||||
|
|||||||
@@ -30,6 +30,22 @@ except Exception as e:
|
|||||||
|
|
||||||
config = ""
|
config = ""
|
||||||
for host, params in hosts.items():
|
for host, params in hosts.items():
|
||||||
|
websocket = ""
|
||||||
|
for url in params.get("websocket", []):
|
||||||
|
websocket += """
|
||||||
|
location {url} {{
|
||||||
|
resolver 127.0.0.11;
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
proxy_read_timeout 86400;
|
||||||
|
proxy_send_timeout 86400;
|
||||||
|
|
||||||
|
proxy_pass http://{target_host}:{port};
|
||||||
|
}}
|
||||||
|
""".format(url=url, target_host=params["host"], port=params["port"])
|
||||||
config += """
|
config += """
|
||||||
server {{
|
server {{
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
@@ -49,13 +65,16 @@ for host, params in hosts.items():
|
|||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
{websocket}
|
||||||
|
|
||||||
location / {{
|
location / {{
|
||||||
resolver 127.0.0.11;
|
resolver 127.0.0.11;
|
||||||
proxy_pass http://{target_host}:{port};
|
proxy_pass http://{target_host}:{port};
|
||||||
}}
|
}}
|
||||||
|
|
||||||
}}\n\n
|
}}\n\n
|
||||||
""".format(
|
""".format(
|
||||||
host=host, target_host=params["host"], port=params["port"]
|
host=host, target_host=params["host"], port=params["port"], websocket=websocket
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
fullchain = minio_client.get_object(
|
fullchain = minio_client.get_object(
|
||||||
|
|||||||
Reference in New Issue
Block a user