-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
46 lines (42 loc) · 945 Bytes
/
docker-compose.yml
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
version: '3.9'
services:
web:
container_name: shop-web
build:
context: .
dockerfile: ./Dockerfile
entrypoint: bash
command: >
-c "cd /code/shop_api && uvicorn main:app --reload --host=0.0.0.0 --port=8080"
volumes:
- ./alembic:/code/alembic
- ./shop_api:/code/shop_api
- ./tests:/code/tests
env_file:
- ./.envs/.local/app.secrets.env
ports:
- "8080:8080"
depends_on:
- db
networks:
- postgres_network
restart: unless-stopped
db:
container_name: shop-db
image: postgres:15.2
volumes:
- postgres_data:/var/lib/postgresql/data/pgdata
env_file:
- ./.envs/.local/app.secrets.env
environment:
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
networks:
- postgres_network
restart: unless-stopped
networks:
postgres_network:
driver: bridge
volumes:
postgres_data: