diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..956d92d --- /dev/null +++ b/.env.example @@ -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 diff --git a/.gitignore b/.gitignore index 280e44e..63f8e0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/downloads/ \ No newline at end of file +/downloads/ +.env \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index bef2249..a86e314 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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