feat: add docker enviroment for tests

This commit is contained in:
jfmcarreira committed 2026-10-05 23:00:11 +01:00
1 parent 8b34da4c88
commit e64b7ac548
5 files changed
+52 -4

No files matched your search

+15 -1
View File
@@ -4,8 +4,22 @@ services:
container_name: bar-rota
restart: unless-stopped
env_file:
- .env
- path: .env
required: false
ports:
- "8000:8000"
volumes:
- ./data:/app/data
tests:
build:
context: .
target: test
profiles:
- test
environment:
SECRET_KEY: test-only-secret-key
DATABASE_URL: sqlite:///./data/test.db
INITIAL_ADMIN_PASSWORD: test-only-password
PYTHONPATH: /app
command: ["pytest", "-ra"]