-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
53 lines (53 loc) · 1.18 KB
/
docker-compose.yaml
File metadata and controls
53 lines (53 loc) · 1.18 KB
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
version: '2.1'
services:
postgres:
image: postgres:alpine
restart: unless-stopped
#ports: ['5432:5432']
environment:
POSTGRES_DB: db
POSTGRES_USER: user
POSTGRES_PASSWORD: password
networks:
my-app.com:
aliases:
- db
- postgres
- db.my-app.com
- postgres.my-app.com
healthcheck:
test: pg_isready --host=127.0.0.1 --port=5432 --username=$$POSTGRES_USER --dbname=$$POSTGRES_DB
timeout: 6s
retries: 66
interval: 3s
jboss:
depends_on:
postgres:
condition: service_healthy
build: .
restart: unless-stopped
ports: ['8080:8080']
#ports:
# - '5005:5005'
# - '8080:8080'
# - '9990:9990'
environment:
POSTGRES_DB: db
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_HOST: db.my-app.com
networks:
my-app.com:
aliases:
- app
- jboss
- app.my-app.com
- jboss.my-app.com
healthcheck:
test: wget -q --spider http://127.0.0.1:8080/app/health || exit 1
timeout: 6s
retries: 66
interval: 6s
networks:
my-app.com:
driver: bridge