-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
46 lines (42 loc) · 929 Bytes
/
docker-compose.yaml
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.7'
services:
app:
build:
context: src
container_name: app
env_file:
- ./.env
volumes:
- "./src/:/home/code"
ports:
- "8000:8000"
entrypoint: uvicorn app:app --port=8000 --host=0.0.0.0 --reload
depends_on:
- db
db:
image: postgres:14-alpine
container_name: db
ports:
- "54321:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_NAME}
volumes:
- postgres_data:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4:7.2
container_name: pgadmin
environment:
- PGADMIN_DEFAULT_EMAIL=admin@gmail.com
- PGADMIN_DEFAULT_PASSWORD=admin
volumes:
- pgadmin_data:/var/lib/pgadmin
ports:
- "5050:80"
restart: unless-stopped
depends_on:
- db
volumes:
postgres_data:
pgadmin_data: