mirror of
https://github.com/tubearchivist/tubearchivist-server.git
synced 2024-11-22 03:40:12 +00:00
add discord invite redirect
This commit is contained in:
parent
1c01f062ec
commit
c7591d6cc2
@ -4,6 +4,7 @@ services:
|
|||||||
nginx-proxy:
|
nginx-proxy:
|
||||||
image: nginxproxy/nginx-proxy
|
image: nginxproxy/nginx-proxy
|
||||||
container_name: nginx-proxy
|
container_name: nginx-proxy
|
||||||
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
@ -20,6 +21,7 @@ services:
|
|||||||
nginx-proxy-acme:
|
nginx-proxy-acme:
|
||||||
image: nginxproxy/acme-companion
|
image: nginxproxy/acme-companion
|
||||||
container_name: nginx-proxy-acme
|
container_name: nginx-proxy-acme
|
||||||
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./volume/nginx-proxy/certs:/etc/nginx/certs
|
- ./volume/nginx-proxy/certs:/etc/nginx/certs
|
||||||
- ./volume/nginx-proxy/vhost:/etc/nginx/vhost.d
|
- ./volume/nginx-proxy/vhost:/etc/nginx/vhost.d
|
||||||
@ -52,6 +54,8 @@ services:
|
|||||||
- ./volume/tubearchivist/data:/data
|
- ./volume/tubearchivist/data:/data
|
||||||
env_file:
|
env_file:
|
||||||
- ./env/tubearchivist.env
|
- ./env/tubearchivist.env
|
||||||
|
environment:
|
||||||
|
- discord=gkWMk9Qupk
|
||||||
expose:
|
expose:
|
||||||
- "8080"
|
- "8080"
|
||||||
networks:
|
networks:
|
||||||
|
@ -18,6 +18,8 @@ services:
|
|||||||
- ./volume/tubearchivist/data:/data
|
- ./volume/tubearchivist/data:/data
|
||||||
env_file:
|
env_file:
|
||||||
- ./env/tubearchivist.env
|
- ./env/tubearchivist.env
|
||||||
|
environment:
|
||||||
|
- discord=gkWMk9Qupk
|
||||||
expose:
|
expose:
|
||||||
- "8080"
|
- "8080"
|
||||||
# backend postgres
|
# backend postgres
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="social-item">
|
<div class="social-item">
|
||||||
<a href="https://discord.gg/AFwz8nE7BK" target="_blank">
|
<a href="/discord" target="_blank">
|
||||||
<img src="/static/img/logo-discord.png" alt="discord-logo">
|
<img src="/static/img/logo-discord.png" alt="discord-logo">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
from os import environ
|
from os import environ
|
||||||
|
|
||||||
from apscheduler.schedulers.background import BackgroundScheduler
|
from apscheduler.schedulers.background import BackgroundScheduler
|
||||||
from flask import Flask, render_template, jsonify, request
|
from flask import Flask, render_template, jsonify, request, redirect
|
||||||
from src.api_docker import run_docker_backup
|
from src.api_docker import run_docker_backup
|
||||||
from src.webhook_docker import DockerHook
|
from src.webhook_docker import DockerHook
|
||||||
from src.webhook_github import GithubBackup, GithubHook
|
from src.webhook_github import GithubBackup, GithubHook
|
||||||
@ -33,6 +33,13 @@ def home():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/discord")
|
||||||
|
def discord_redirect():
|
||||||
|
"""redirect to current discord invite link"""
|
||||||
|
invite = environ.get("discord")
|
||||||
|
return redirect(f"https://discord.gg/{invite}", code=302)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/api/release/<release_id>/")
|
@app.route("/api/release/<release_id>/")
|
||||||
def release(release_id):
|
def release(release_id):
|
||||||
"""api release"""
|
"""api release"""
|
||||||
|
Loading…
Reference in New Issue
Block a user