-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (34 loc) · 1.04 KB
/
docker-compose.yml
File metadata and controls
38 lines (34 loc) · 1.04 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
services:
postgres:
image: postgres:16.4-alpine
restart: unless-stopped
ports:
- '5432:5432'
environment:
POSTGRES_DATABASE: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
flyway:
image: flyway/flyway:10.2-alpine
restart: no
command: -url=jdbc:postgresql://postgres:5432/postgres -schemas=public -user=postgres -password=postgres -connectRetries=60 migrate
volumes:
- ./src/main/resources/db/migration:/flyway/sql
depends_on:
- postgres
# Можно закомментировать секцию application и использовать docker-compose
# как окружения для запуска сервиса через gradle run
application:
image: kora-java-crud-template
build: .
restart: unless-stopped
ports:
- '8080:8080'
- '8085:8085'
environment:
POSTGRES_JDBC_URL: jdbc:postgresql://postgres:5432/postgres
POSTGRES_USER: postgres
POSTGRES_PASS: postgres
depends_on:
- postgres
- flyway