-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (64 loc) · 1.39 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
67
68
69
70
services:
frontend:
build: ./frontend
ports:
- "80:80"
depends_on:
- backend
networks:
- chat-network
backend:
build: ./backend
environment:
- DB_HOST=postgres
- DB_USER=root
- DB_PASSWORD=rootuser
- DB_NAME=chatapp_db
ports:
- "8080:8080"
depends_on:
- postgres
- rabbitmq
networks:
- chat-network
postgres:
image: postgres:latest
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: rootuser
POSTGRES_DB: chatapp_db
ports:
# expose port 5454 to connect to the database from the host machine
- "5454:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- chat-network
# Uncomment to use pgadmin to be able to connect and manage the postgres database from browser
# pgadmin:
# image: dpage/pgadmin4
# depends_on:
# - postgres
# ports:
# - "5050:80"
# environment:
# PGADMIN_DEFAULT_EMAIL: [email protected]
# PGADMIN_DEFAULT_PASSWORD: rootuser
# restart: unless-stopped
# networks:
# - chat-network
rabbitmq:
image: rabbitmq:3-management
environment:
RABBITMQ_DEFAULT_USER: root
RABBITMQ_DEFAULT_PASS: rootuser
ports:
- "5672:5672"
- "15672:15672"
networks:
- chat-network
networks:
chat-network:
driver: bridge
volumes:
postgres-data: