Codesstyle enhancements

This commit is contained in:
Patrick Jentsch 2024-08-01 12:00:52 +02:00
parent 13e4d461c7
commit 158190de1a
5 changed files with 18 additions and 22 deletions

View File

@ -1,5 +1,5 @@
##############################################################################
# Environment variables to configure the db service in docker-compose.yml. #
# Environment variables used by the Docker db service. #
# #
# More information about the environment variables can be found here: #
# https://hub.docker.com/_/postgres #

View File

@ -1,7 +1,7 @@
services:
nopaque:
environment:
- FLASK_DEBUG=True
FLASK_DEBUG: "True"
ports:
- "5000:5000"
volumes:

View File

@ -1,4 +1,4 @@
services:
nopaque:
environment:
- NOPAQUE_IS_PRIMARY_INSTANCE=False
NOPAQUE_IS_PRIMARY_INSTANCE: "False"

View File

@ -6,29 +6,26 @@ networks:
services:
nopaque:
environment:
- NOPAQUE_PROXY_FIX_ENABLED=True
- NOPAQUE_PROXY_FIX_X_FOR=1
- NOPAQUE_PROXY_FIX_X_HOST=1
- NOPAQUE_PROXY_FIX_X_PORT=1
- NOPAQUE_PROXY_FIX_X_PREFIX=0
- NOPAQUE_PROXY_FIX_X_PROTO=1
NOPAQUE_PROXY_FIX_ENABLED: "True"
NOPAQUE_PROXY_FIX_X_FOR: "1"
NOPAQUE_PROXY_FIX_X_HOST: "1"
NOPAQUE_PROXY_FIX_X_PORT: "1"
NOPAQUE_PROXY_FIX_X_PREFIX: "0"
NOPAQUE_PROXY_FIX_X_PROTO: "1"
labels:
- "traefik.docker.network=traefik"
- "traefik.enable=true"
### <http> ###
# HTTP
- "traefik.http.routers.http-nopaque.entrypoints=http"
- "traefik.http.routers.http-nopaque.middlewares=redirect-to-https@file"
# Replace <nopaque-domain> with your domain
- "traefik.http.routers.http-nopaque.rule=Host(`<nopaque-domain>`)"
### </http> ###
### <https> ###
# HTTPS
- "traefik.http.routers.https-nopaque.entrypoints=https"
- "traefik.http.routers.https-nopaque.middlewares=hsts-header@file"
# Replace <nopaque-domain> with your domain
- "traefik.http.routers.https-nopaque.rule=Host(`<nopaque-domain>`)"
- "traefik.http.routers.https-nopaque.tls.certresolver=<CERTRESOLVER>"
- "traefik.http.routers.https-nopaque.tls.options=intermediate@file"
### </https> ###
networks:
- default
- traefik
- "nopaque"
- "traefik"

View File

@ -1,9 +1,5 @@
##############################################################################
# Environment variables to configure the nopaque. #
# - When running nopaque with Docker Compose, these variables are set in the #
# `docker-compose.yml` file. #
# - When running nopaque without Docker, these variables are loaded by #
# nopaque in the config.py file #
# Environment variables used by nopaque. #
##############################################################################
@ -11,6 +7,9 @@
# Flask #
# https://flask.palletsprojects.com/en/1.1.x/config/ #
##############################################################################
# DEFAULT: /
# APPLICATION_ROOT=
# CHOOSE ONE: http, https
# DEFAULT: http
# PREFERRED_URL_SCHEME=
@ -112,7 +111,7 @@ SQLALCHEMY_DATABASE_URI=
NOPAQUE_ADMIN=
# DEFAULT: /mnt/nopaque
# NOTES:
# NOTES:
# - This must be a network share and it must be available on all
# Docker Swarm nodes, mounted to the same path with the same
# user and group ownership