-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
44 lines (40 loc) · 1.11 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
version: '3.3'
services:
# Postgresql 11 DB
PostgreSQL:
environment:
- POSTGRES_DB=${DATABASE_NAME}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
- POSTGRES_USER=${DATABASE_USERNAME}
- PGPORT=${DATABASE_PORT}
image: postgres:11-alpine
env_file: .env
ports:
- "${DATABASE_PORT}:${DATABASE_PORT}"
volumes:
- postgres:/var/lib/postgresql/${DATABASE_NAME}/data:rw
healthcheck:
test: [ "CMD", "pg_isready -U postgres" ]
interval: 3s
timeout: 5s
retries: 5
# Spring Boot app
odm-platform:
depends_on:
- PostgreSQL
build:
context: .
dockerfile: product-plane-services/registry-server/Dockerfile
args:
SPRING_PROFILES_ACTIVE: "docker"
SPRING_PORT: "${SPRING_PORT}"
JAVA_OPTS: ""
DATABASE_URL: "jdbc:postgresql://PostgreSQL:${DATABASE_PORT}/${DATABASE_NAME}"
DATABASE_USERNAME: "${DATABASE_USERNAME}"
DATABASE_PASSWORD: "${DATABASE_PASSWORD}"
FLYWAY_SCRIPTS_DIR: "postgresql"
env_file: .env
ports:
- "${SPRING_PORT}:${SPRING_PORT}"
volumes:
postgres: