-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.cathedral.yml
82 lines (77 loc) · 2.73 KB
/
docker-compose.cathedral.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
71
72
73
74
75
76
77
78
79
80
81
82
version: "3.7"
services:
# Database
postgres:
container_name: postgres
image: postgres:12.2-alpine # use official postgres version 12.2
restart: unless-stopped
volumes:
- database-data:/var/lib/postgresql/data/ # persist data even if container shuts down
environment:
POSTGRES_USER: docker
POSTGRES_PASSWORD: docker
POSTGRES_DB: acm
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
PGDATA: /var/lib/postgresql/data/
ports:
- target: 5432 # the port inside the container
published: 35432 # the publicly exposed port
protocol: tcp # the port protocol (tcp or udp)
mode: bridge # bridge networks are used to connect multiple containers together
# Database Administration Tool
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
depends_on:
- postgres
environment:
PGADMIN_DEFAULT_EMAIL: "[email protected]"
PGADMIN_DEFAULT_PASSWORD: "PgAdmin2020!"
volumes:
- ./mocks:/pgadmin4/mocks
- ./database.json:/pgadmin4/servers.json
ports:
- target: 80 # the port inside the container
published: 8080 # the publicly exposed port
protocol: tcp # the port protocol (tcp or udp)
mode: bridge # bridge networks are used to connect multiple containers together
# Website written in Angular
chapter-website:
container_name: Chapter-Website
image: chapter-website:v0.3.0
restart: unless-stopped
build:
context: ./Chapter-Website
dockerfile: Dockerfile
environment:
NODE_ENV: production
depends_on:
- cathedral
ports:
- target: 4200 # the port inside the container
published: 4200 # the publicly exposed port
protocol: tcp # the port protocol (tcp or udp)
mode: bridge # bridge networks are used to connect multiple containers together
cathedral:
container_name: cathedral
image: cathedral:v0.0.1
build:
context: ./Cathedral
dockerfile: Dockerfile
depends_on:
- postgres
- pgadmin
environment:
POSTGRES_HOST: host.docker.internal
POSTGRES_PORT: 35432
POSTGRES_DB: acm
POSTGRES_USER: docker
POSTGRES_PASSWORD: docker
ports:
- target: 5000
published: 4205
protocol: tcp
mode: bridge
volumes:
database-data: # named volumes can be managed easier using docker-compose