diff --git a/README.md b/README.md index 5cd2aa1..17006cc 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ source .venv/bin/activate pip install -e ".[dev]" ``` -### Run +### Run Container ```bash export FLASK_APP=wsgi.py @@ -86,6 +86,12 @@ Open `http://127.0.0.1:8000`. docker compose up --build web ``` +Compose settings are stored in `env`. Update that file to change values such as: + +- `SECRET_KEY` +- `MAX_UPLOAD_SIZE_MB` +- `OUTPUT_DIRECTORY` + ### Run the test suite in a container ```bash diff --git a/compose.yaml b/compose.yaml index 9aaa058..b78095e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -5,15 +5,12 @@ services: target: production ports: - "8000:8000" - environment: - SECRET_KEY: change-me - MAX_UPLOAD_SIZE_MB: "120" - OUTPUT_DIRECTORY: /app/instance/outputs + env_file: + - env test: build: context: . target: test - environment: - MAX_UPLOAD_SIZE_MB: "120" - OUTPUT_DIRECTORY: /app/instance/outputs + env_file: + - env diff --git a/env b/env new file mode 100644 index 0000000..ddf01ce --- /dev/null +++ b/env @@ -0,0 +1,3 @@ +SECRET_KEY=change-me +MAX_UPLOAD_SIZE_MB=120 +OUTPUT_DIRECTORY=/app/instance/outputs