-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (53 loc) · 1.3 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
version: "3.9"
name: campus-hub
services:
# Student application's PostgreSQL database running on port 5001
student-db:
image: postgres
restart: always
environment:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
POSTGRES_DB: student
volumes:
- student-data:/var/lib/postgresql/data
ports:
- "5001:5432"
# Library application's PostgreSQL database running on port 5002
library-db:
image: postgres
restart: always
environment:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
POSTGRES_DB: library
volumes:
- library-data:/var/lib/postgresql/data
ports:
- "5002:5432"
# Finance application's PostgreSQL database running on port 5003
finance-db:
image: postgres
restart: always
environment:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
POSTGRES_DB: finance
volumes:
- finance-data:/var/lib/postgresql/data
ports:
- "5003:5432"
# Use Adminer to quickly view the database at localhost:8080
adminer:
image: adminer
restart: always
ports:
- "8069:8080"
# Volumes for persisting data in the databases, so that data is not lost when containers are shut down
volumes:
student-data:
driver: local
library-data:
driver: local
finance-data:
driver: local