-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (43 loc) · 918 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (43 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: "3.9"
services:
db:
container_name: postgress_db
image: postgres
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
ports:
- 5432:5432
env_file:
- .env
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
base:
container_name: base
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/app
env_file:
- .env
app:
extends: base
container_name: boilerplate
ports:
- 8000:8000
restart: always
depends_on:
- db
command: bash -c "uv run fastapi run app/main.py --host 0.0.0.0 --port 8000"
pytest:
extends: base
container_name: pytest
environment:
- DB_ASYNC_URL=sqlite+aiosqlite:///./test.db
command: bash -c "uv run pytest -vvv"
volumes:
postgres_data:
driver: local