Autoload `whoogle.env` if it exists
The whoogle.env file previously needed to be created and enabled using the WHOOGLE_DOTENV var. This removes the second step and loads the env file if it's found during app init. The Dockerfile has also been updated to copy in whoogle.env if it exists. Fixes #909main
parent
aa54491ae0
commit
fdc63b862e
|
@ -75,8 +75,7 @@ COPY --from=builder /install /usr/local
|
|||
COPY misc/tor/torrc /etc/tor/torrc
|
||||
COPY misc/tor/start-tor.sh misc/tor/start-tor.sh
|
||||
COPY app/ app/
|
||||
COPY run .
|
||||
#COPY whoogle.env .
|
||||
COPY run whoogle.env* ./
|
||||
|
||||
# Create user/group to run as
|
||||
RUN adduser -D -g $DOCKER_USERID -u $DOCKER_USERID $DOCKER_USER
|
||||
|
|
|
@ -28,7 +28,7 @@ dot_env_path = (
|
|||
'../whoogle.env'))
|
||||
|
||||
# Load .env file if enabled
|
||||
if read_config_bool('WHOOGLE_DOTENV'):
|
||||
if os.path.exists(dot_env_path):
|
||||
load_dotenv(dot_env_path)
|
||||
|
||||
app.enc_key = generate_key()
|
||||
|
|
Loading…
Reference in New Issue