Move compose settings to env file

This commit is contained in:
Alfredo Di Stasio
2026-04-27 09:48:55 +02:00
parent 15240aee59
commit 9313b54abb
3 changed files with 14 additions and 8 deletions

View File

@@ -38,7 +38,7 @@ source .venv/bin/activate
pip install -e ".[dev]" pip install -e ".[dev]"
``` ```
### Run ### Run Container
```bash ```bash
export FLASK_APP=wsgi.py export FLASK_APP=wsgi.py
@@ -86,6 +86,12 @@ Open `http://127.0.0.1:8000`.
docker compose up --build web 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 ### Run the test suite in a container
```bash ```bash

View File

@@ -5,15 +5,12 @@ services:
target: production target: production
ports: ports:
- "8000:8000" - "8000:8000"
environment: env_file:
SECRET_KEY: change-me - env
MAX_UPLOAD_SIZE_MB: "120"
OUTPUT_DIRECTORY: /app/instance/outputs
test: test:
build: build:
context: . context: .
target: test target: test
environment: env_file:
MAX_UPLOAD_SIZE_MB: "120" - env
OUTPUT_DIRECTORY: /app/instance/outputs

3
env Normal file
View File

@@ -0,0 +1,3 @@
SECRET_KEY=change-me
MAX_UPLOAD_SIZE_MB=120
OUTPUT_DIRECTORY=/app/instance/outputs