OpenSlides/docker/setup-prod.sh

13 lines
439 B
Bash
Raw Normal View History

2020-10-05 10:43:43 +02:00
#!/bin/bash
# Create keys for auth, if they do not exist
if [ ! -f secrets/auth_token_key ]; then
tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c 64 > secrets/auth_token_key
fi
if [ ! -f secrets/auth_cookie_key ]; then
tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c 64 > secrets/auth_cookie_key
2020-10-05 10:43:43 +02:00
fi
( set -a; source .env; m4 docker-compose.yml.m4 ) > docker-compose.yml
( set -a; source .env; m4 docker-stack.yml.m4 ) > docker-stack.yml