-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
66 lines (60 loc) · 1.32 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
version: "3.8"
services:
web:
build:
context: .
dockerfile: Dockerfile
container_name: chat-backend
environment:
- ENVIRONMENT=development
ports:
- "8001:8001"
volumes:
- .:/opt/chat
depends_on:
- db
networks:
- chat-net
command: uvicorn src.main:app --host=0.0.0.0 --port=8001 --reload
db:
image: postgres:15-alpine
container_name: chat-postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5442:5432
volumes:
- postgres_data:/var/lib/postgresql/data/
networks:
- chat-net
command: ["postgres", "-c", "log_statement=all"] # show logs
redis-service:
image: redis
container_name: chat-redis
restart: always
ports:
- "6379:6379"
networks:
- chat-net
pgadmin:
container_name: chat-pgadmin
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- "7070:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
networks:
- chat-net
networks:
chat-net:
external: true
volumes:
postgres_data:
pgadmin_data: