mirror of
				https://git.tt-rss.org/fox/ttrss-docker-compose
				synced 2025-11-04 09:34:13 +01:00 
			
		
		
		
	pull all set environment variables into app/etc
This commit is contained in:
		
							parent
							
								
									5f6651e6f0
								
							
						
					
					
						commit
						828c4180cd
					
				
					 4 changed files with 19 additions and 6 deletions
				
			
		| 
						 | 
					@ -11,6 +11,11 @@ POSTGRES_PASSWORD=password
 | 
				
			||||||
# for more information.
 | 
					# for more information.
 | 
				
			||||||
SELF_URL_PATH=http://localhost:8280/tt-rss
 | 
					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.
 | 
					# 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
 | 
					# if you plan to run the container standalone and need origin port exposed
 | 
				
			||||||
# use next HTTP_PORT definition (or remove "127.0.0.1:").
 | 
					# 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
 | 
						sleep 3
 | 
				
			||||||
done
 | 
					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
 | 
					if ! id app >/dev/null 2>&1; then
 | 
				
			||||||
	addgroup -g $OWNER_GID app
 | 
						addgroup -g $OWNER_GID app
 | 
				
			||||||
	adduser -D -h /var/www/html -G app -u $OWNER_UID 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
 | 
						$PSQL < /var/www/html/tt-rss/schema/ttrss_schema_pgsql.sql
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export SELF_URL_PATH=$(echo $SELF_URL_PATH | sed -e 's/[\/&]/\\&/g')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
env
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [ ! -s $DST_DIR/config.php ]; then
 | 
					if [ ! -s $DST_DIR/config.php ]; then
 | 
				
			||||||
	cp /config.docker.php $DST_DIR/config.php
 | 
						cp /config.docker.php $DST_DIR/config.php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,9 @@
 | 
				
			||||||
#!/bin/sh -e
 | 
					#!/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.
 | 
					# wait for the app container to delete .app_is_ready and perform rsync, etc.
 | 
				
			||||||
sleep 30
 | 
					sleep 30
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,11 +17,12 @@ services:
 | 
				
			||||||
      context:
 | 
					      context:
 | 
				
			||||||
        ./app
 | 
					        ./app
 | 
				
			||||||
    restart: unless-stopped
 | 
					    restart: unless-stopped
 | 
				
			||||||
 | 
					    env_file:
 | 
				
			||||||
 | 
					      - .env
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      - DB_NAME=${POSTGRES_USER}
 | 
					      - DB_NAME=${POSTGRES_USER}
 | 
				
			||||||
      - DB_USER=${POSTGRES_USER}
 | 
					      - DB_USER=${POSTGRES_USER}
 | 
				
			||||||
      - DB_PASS=${POSTGRES_PASSWORD}
 | 
					      - DB_PASS=${POSTGRES_PASSWORD}
 | 
				
			||||||
      - SELF_URL_PATH=${SELF_URL_PATH}
 | 
					 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - app:/var/www/html
 | 
					      - app:/var/www/html
 | 
				
			||||||
      - ./config.d:/opt/tt-rss/config.d:ro
 | 
					      - ./config.d:/opt/tt-rss/config.d:ro
 | 
				
			||||||
| 
						 | 
					@ -49,11 +50,12 @@ services:
 | 
				
			||||||
      context:
 | 
					      context:
 | 
				
			||||||
        ./app
 | 
					        ./app
 | 
				
			||||||
    restart: unless-stopped
 | 
					    restart: unless-stopped
 | 
				
			||||||
 | 
					    env_file:
 | 
				
			||||||
 | 
					      - .env
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      - DB_NAME=${POSTGRES_USER}
 | 
					      - DB_NAME=${POSTGRES_USER}
 | 
				
			||||||
      - DB_USER=${POSTGRES_USER}
 | 
					      - DB_USER=${POSTGRES_USER}
 | 
				
			||||||
      - DB_PASS=${POSTGRES_PASSWORD}
 | 
					      - DB_PASS=${POSTGRES_PASSWORD}
 | 
				
			||||||
      - SELF_URL_PATH=${SELF_URL_PATH}
 | 
					 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - app:/var/www/html
 | 
					      - app:/var/www/html
 | 
				
			||||||
      - ./config.d:/opt/tt-rss/config.d:ro
 | 
					      - ./config.d:/opt/tt-rss/config.d:ro
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue