-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
47 lines (43 loc) · 1.25 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
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
executor-azuredevops:
depends_on:
- PostgreSQL
build:
context: .
dockerfile: Dockerfile
args:
SPRING_PROFILES_ACTIVE: "docker"
JAVA_OPTS: ""
SPRING_PORT: "${SPRING_PORT}"
AZURE_ODM_APP_CLIENT_ID: "${AZURE_ODM_APP_CLIENT_ID}"
AZURE_ODM_APP_CLIENT_SECRET: "${AZURE_ODM_APP_CLIENT_SECRET}"
AZURE_TENANT_ID: "${AZURE_TENANT_ID}"
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: