-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.mariposa.yml
64 lines (60 loc) · 2.11 KB
/
docker-compose.mariposa.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
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
mariposa:
container_name: mariposa
image: mariposa:0.0.1-SNAPSHOT
build:
context: ./Mariposa
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: 8080
published: 4204
protocol: tcp
mode: bridge
volumes:
database-data: # named volumes can be managed easier using docker-compose