pull all set environment variables into app/etc

legacy-php5
Andrew Dolgov 3 years ago
parent 5f6651e6f0
commit 828c4180cd

@ -11,6 +11,11 @@ POSTGRES_PASSWORD=password
# for more information.
SELF_URL_PATH=http://localhost:8280/tt-rss
# You can customize other config.php defines by setting overrides here.
# See app/Dockerfile for complete list.
# PLUGINS=auth_remote,note
# CHECK_FOR_UPDATES="true"
# bind exposed port to 127.0.0.1 by default in case reverse proxy is used.
# if you plan to run the container standalone and need origin port exposed
# use next HTTP_PORT definition (or remove "127.0.0.1:").

@ -5,6 +5,12 @@ while ! pg_isready -h $DB_HOST -U $DB_USER; do
sleep 3
done
# We don't need those here (HTTP_HOST would cause false SELF_URL_PATH check failures)
unset HTTP_PORT
unset HTTP_HOST
env
if ! id app >/dev/null 2>&1; then
addgroup -g $OWNER_GID app
adduser -D -h /var/www/html -G app -u $OWNER_UID app
@ -66,10 +72,6 @@ elif ! $PSQL -c 'select * from ttrss_version'; then
$PSQL < /var/www/html/tt-rss/schema/ttrss_schema_pgsql.sql
fi
export SELF_URL_PATH=$(echo $SELF_URL_PATH | sed -e 's/[\/&]/\\&/g')
env
if [ ! -s $DST_DIR/config.php ]; then
cp /config.docker.php $DST_DIR/config.php

@ -1,5 +1,9 @@
#!/bin/sh -e
# We don't need those here (HTTP_HOST would cause false SELF_URL_PATH check failures)
unset HTTP_PORT
unset HTTP_HOST
# wait for the app container to delete .app_is_ready and perform rsync, etc.
sleep 30

@ -17,11 +17,12 @@ services:
context:
./app
restart: unless-stopped
env_file:
- .env
environment:
- DB_NAME=${POSTGRES_USER}
- DB_USER=${POSTGRES_USER}
- DB_PASS=${POSTGRES_PASSWORD}
- SELF_URL_PATH=${SELF_URL_PATH}
volumes:
- app:/var/www/html
- ./config.d:/opt/tt-rss/config.d:ro
@ -49,11 +50,12 @@ services:
context:
./app
restart: unless-stopped
env_file:
- .env
environment:
- DB_NAME=${POSTGRES_USER}
- DB_USER=${POSTGRES_USER}
- DB_PASS=${POSTGRES_PASSWORD}
- SELF_URL_PATH=${SELF_URL_PATH}
volumes:
- app:/var/www/html
- ./config.d:/opt/tt-rss/config.d:ro

Loading…
Cancel
Save