-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
41 lines (36 loc) · 811 Bytes
/
docker-compose.dev.yml
File metadata and controls
41 lines (36 loc) · 811 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
version: '3.8'
services:
web:
build: ./src
command: "sh -c 'alembic upgrade head && uvicorn main:app --reload --workers 1 --host 0.0.0.0 --port 8000'"
volumes:
- .:/usr/src/src
ports:
- 8004:8000
restart: always
depends_on:
db:
condition: service_healthy
db:
image: postgres:15.3
expose:
- "5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=db_product
restart: always
healthcheck:
test: "pg_isready -U postgres"
interval: 5s
timeout: 5s
retries: 5
db_test:
image: postgres:15.3
expose:
- "5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=db_product
restart: always