mirror of
https://github.com/tubearchivist/tubearchivist-server.git
synced 2024-12-22 09:50:14 +00:00
add discord invite redirect
This commit is contained in:
parent
1c01f062ec
commit
c7591d6cc2
@ -4,6 +4,7 @@ services:
|
||||
nginx-proxy:
|
||||
image: nginxproxy/nginx-proxy
|
||||
container_name: nginx-proxy
|
||||
restart: always
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
@ -20,6 +21,7 @@ services:
|
||||
nginx-proxy-acme:
|
||||
image: nginxproxy/acme-companion
|
||||
container_name: nginx-proxy-acme
|
||||
restart: always
|
||||
volumes:
|
||||
- ./volume/nginx-proxy/certs:/etc/nginx/certs
|
||||
- ./volume/nginx-proxy/vhost:/etc/nginx/vhost.d
|
||||
@ -52,6 +54,8 @@ services:
|
||||
- ./volume/tubearchivist/data:/data
|
||||
env_file:
|
||||
- ./env/tubearchivist.env
|
||||
environment:
|
||||
- discord=gkWMk9Qupk
|
||||
expose:
|
||||
- "8080"
|
||||
networks:
|
||||
|
@ -18,6 +18,8 @@ services:
|
||||
- ./volume/tubearchivist/data:/data
|
||||
env_file:
|
||||
- ./env/tubearchivist.env
|
||||
environment:
|
||||
- discord=gkWMk9Qupk
|
||||
expose:
|
||||
- "8080"
|
||||
# backend postgres
|
||||
|
@ -33,7 +33,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<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">
|
||||
</a>
|
||||
</div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
from os import environ
|
||||
|
||||
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.webhook_docker import DockerHook
|
||||
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>/")
|
||||
def release(release_id):
|
||||
"""api release"""
|
||||
|
Loading…
Reference in New Issue
Block a user