-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
46 lines (42 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
45
46
version: '3.9'
services:
api:
build:
context: .
dockerfile: Dockerfile
args:
JAR_FILE: ./target/api-proc-arquivo-0.0.1-SNAPSHOT.jar
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/processamentoarquivo
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres@123
depends_on:
- postgres
postgres:
image: postgres:latest
restart: always
environment:
POSTGRES_DB: processamentoarquivo
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres@123
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
flyway:
image: flyway/flyway
command: -url=jdbc:postgresql://postgres:5432/processamentoarquivo -schemas=public -user=postgres -password=postgres@123 migrate
depends_on:
postgres:
condition: service_healthy
volumes:
- ./db/migration:/flyway/sql
volumes:
postgres_data: