Unverified Commit 9436e6c7 authored by Tom Moulard's avatar Tom Moulard
Browse files

chore: generate .env.default config file

parent a9d8512a
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
ROOT_EMAIL=change@me.org
HOME=
MORTY_IMAGE_VERSION=
MORTY_KEY=
ROOT_EMAIL=
SEARX_IMAGE_VERSION=
SITE=
SYNAPSE_CONFIG_PATH=
TRAEFIK_CHECK_NEW_VERSION=
TRAEFIK_EXPOSED_BY_DEFAULT=
TRAEFIK_IMAGE_VERSION=
TRAEFIK_LOG_LEVEL=
TRAEFIK_PILOT_TOKEN=
TRAEFIK_PLUGINS=
TRAEFIK_SEND_ANONYMOUS_USAGE=
TRAEFIK_WEB_ENTRYPOINT=
TRAEFIK_WEBSECURE_ENTRYPOINT=
TZ=
USERNAME=
USERS=
+1 −0
Original line number Diff line number Diff line
@@ -4,5 +4,6 @@ blog/nginx/conf/www
gitlab/logs
portainer/data
.env
.env.generated
*.patch
*.swp
+5 −0
Original line number Diff line number Diff line
@@ -77,6 +77,11 @@ You can add a new set of credentials by editing the .env file like
USERS=toto:pass,tata:pass, ...
```

The `.env.default` is generated using this command:
```bash
grep '${' **/docker-compose.*.yml | sed "s/.*\${\(.*\)}.*/\1/g" | cut -d":" -f 1 | sort -u | xargs -I % echo "%=" >> .env.default
```

### For local developments
Edit the file `/etc/hosts` to provide the reverse proxy with good URLs.

+4 −4
Original line number Diff line number Diff line
@@ -29,14 +29,14 @@ test dc config -q
file=$(mktemp)
dc config > $file 2>$log_file
test diff test_config.yml $file
rm $file
mv $file test_config.yml

# Creating a patch to fix test_config.yml
dc config > test_config.yml
grep '${' **/docker-compose.*.yml | sed "s/.*\${\(.*\)}.*/\1/g" | cut -d":" -f 1 | sort -u | xargs -I % echo "%=" >> .env.generated
test diff .env.default .env.generated
mv .env.generated .env.default

git diff | tee patch.patch

[ $errors -gt 0 ] && echo "There were $errors errors found" && exit 1

exit 0