-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (39 loc) · 774 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (39 loc) · 774 Bytes
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
version: '3'
services:
postgres:
image: postgres:9.6
environment:
POSTGRES_PASSWORD: $PG_PASS
POSTGRES_USER: $PG_USER
POSTGRES_DB: $PG_DB
ports:
- "127.0.0.1:$PG_PORT:5432"
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
app:
build: .
volumes:
- .:/app
- ~/.m2:/root/.m2
working_dir: /app
command: mvn clean spring-boot:run
environment:
- PG_PORT
- PG_DB
- PG_USER
- PG_PASS
- PG_HOST
- APP_PORT
- APP_SECRET
- HIBERNATE_STRATEGY
restart: always
ports:
- "127.0.0.1:$APP_PORT:8080"
links:
- postgres
depends_on:
- postgres