feat: added .env file support

This commit is contained in:
2026-03-07 12:15:34 +01:00
parent bb528b575a
commit acfbe71baa
3 changed files with 16 additions and 6 deletions

9
.env.example Normal file
View File

@@ -0,0 +1,9 @@
# Set a password to protect the app. Leave empty to disable auth.
PASSWORD=
# Host port to expose the app on.
PORT=5000
# Host paths for persistent data.
DOWNLOADS_DIR=./downloads
CONFIG_DIR=./config

1
.gitignore vendored
View File

@@ -1 +1,2 @@
/downloads/
.env

View File

@@ -3,10 +3,10 @@ services:
build: .
container_name: votify-web
ports:
- "5000:5000"
environment:
- PASSWORD=test # Remove or leave empty to disable auth
- "${PORT:-5000}:5000"
env_file:
- .env
volumes:
- ./downloads:/downloads
- ./config:/config
- ${DOWNLOADS_DIR:-./downloads}:/downloads
- ${CONFIG_DIR:-./config}:/config
restart: unless-stopped