Compare commits

..

2 commits

4 changed files with 11 additions and 3 deletions

View file

@ -18,7 +18,7 @@ RUN useradd --create-home --home-dir /gorb gorb
USER gorb
ENV URL=http://localhost:8080 \
ENV WEB_URL=http://localhost:8080 \
DATABASE_USERNAME=gorb \
DATABASE_PASSWORD=gorb \
DATABASE=gorb \

View file

@ -19,7 +19,7 @@ services:
environment:
#- RUST_LOG=debug
# This should be changed to the public URL of the server!
- URL=http://localhost:8080
- WEB_URL=http://localhost:8080
- DATABASE_USERNAME=gorb
- DATABASE_PASSWORD=gorb
- DATABASE=gorb

View file

@ -17,7 +17,7 @@ services:
environment:
#- RUST_LOG=debug
# This should be changed to the public URL of the server!
- URL=http://localhost:8080
- WEB_URL=http://localhost:8080
- DATABASE_USERNAME=gorb
- DATABASE_PASSWORD=gorb
- DATABASE=gorb

View file

@ -14,6 +14,9 @@ fi
if [ ! -f "/gorb/config/config.toml" ]; then
cat > /gorb/config/config.toml <<EOF
[web]
url = "${WEB_URL}"
[database]
username = "${DATABASE_USERNAME}"
password = "${DATABASE_PASSWORD}"
@ -25,6 +28,11 @@ port = ${DATABASE_PORT}
host = "${CACHE_DB_HOST}"
port = ${CACHE_DB_PORT}
EOF
fi
if [ -n "${BUNNY_API_KEY}" ] && ! grep -q "^\[bunny\]" "/gorb/config/config.toml"; then
cat >> "/gorb/config/config.toml" <<EOF
[bunny]
api_key = "${BUNNY_API_KEY}"
endpoint = "${BUNNY_ENDPOINT}"