-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
72 lines (68 loc) · 2.07 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
71
72
version: '3.9'
services:
PostgreSQLDB:
container_name: postgres-db
image: "postgres:14"
# healthcheck:
# test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
# timeout: 45s
# interval: 10s
# retries: 10
# restart: always
environment:
#- POSTGRES_USER if not specified default =postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
# PGDATA: factory default value is "/var/lib/postgresql/data"
# if host-side's volume is a mounting point,
# the value for PGDATA is a subdirectory of the above default value
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- db:/var/lib/postgresql/data
# db.sh => to be executed
- ./psql/db.sh:/docker-entrypoint-initdb.d/db.sh
# pg_hba.conf => ../data drive
- ./psql/pg_hba.conf:/var/lib/postgresql/data/pg_hba.conf
# postgresql.conf => ../data drive
- ./psql/postgresql.conf:/var/lib/postgresql/data/postgresql.conf
ports:
- "65432:5432"
# command: -p 5432
networks:
v4impact:
ipv4_address: 192.168.57.18
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
trsa-web:
container_name: trsa-web-4.220518
ports:
- '8989:8080'
restart: unless-stopped
networks:
v4impact:
ipv4_address: 192.168.57.19
build:
args:
DB_SERVER: 192.168.57.18
context: .
dockerfile: v4.Dockerfile
entrypoint: ["/tini", "--"]
command: ["/bin/sh", "-c", "/opt/payara/scripts/entrypoint.sh"]
depends_on:
PostgreSQLDB:
condition: service_healthy
networks:
v4impact:
driver: bridge
ipam:
driver: default
config:
- subnet: "192.168.57.0/25"
# base image's ENTRYPOINT AND CMD are as follows:
# ENTRYPOINT ["/tini" "--"]
# CMD ["/bin/sh" "-c" "\"${SCRIPT_DIR}/entrypoint.sh\""]
volumes:
db: {}