mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-08-04 18:24:31 +02:00
Improved docker-compose to handle server_address. Also added an option to run without nginx.
This commit is contained in:
parent
5e598deba3
commit
6a2648ddf7
7 changed files with 118 additions and 26 deletions
22
entrypoint.sh
Executable file
22
entrypoint.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$SERVER_ADDRESS" ]; then
|
||||
echo "SERVER_ADDRESS environment variable is not set. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEBUG_VALUE="False"
|
||||
if [[ "${DEBUG_MODE,,}" == "true" ]]; then
|
||||
DEBUG_VALUE="True"
|
||||
fi
|
||||
|
||||
cat > /app/wireguard_webadmin/production_settings.py <<EOL
|
||||
DEBUG = $DEBUG_VALUE
|
||||
ALLOWED_HOSTS = ['$SERVER_ADDRESS']
|
||||
CSRF_TRUSTED_ORIGINS = ['https://$SERVER_ADDRESS']
|
||||
SECRET_KEY = '$(openssl rand -base64 32)'
|
||||
EOL
|
||||
|
||||
exec "$@"
|
Loading…
Add table
Add a link
Reference in a new issue