feat: separate docker compose files
This commit is contained in:
1 parent
21106a70f0
commit
6431ffeec9
8 files changed
+74
-27
No files matched your search
@@ -0,0 +1,32 @@
|
||||
# Development stack: code is bind-mounted, reload is on, no restart policy.
|
||||
# Run standalone: docker compose -f docker-compose.dev.yml up --build
|
||||
# Tests: docker compose -f docker-compose.dev.yml run --rm tests
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
target: dev
|
||||
container_name: bar-rota-dev
|
||||
env_file:
|
||||
- path: .env
|
||||
required: false
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./app:/app/app
|
||||
- ./tests:/app/tests
|
||||
- ${DATA_DIR:-./data}:/app/data
|
||||
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||
|
||||
tests:
|
||||
build:
|
||||
context: .
|
||||
target: dev
|
||||
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"]
|
||||
Reference in new issue
Block a user