-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (45 loc) · 1.35 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
version: '2.1'
services:
# Сервис БД Postgresql
db:
image: postgres:11.6-alpine
container_name: postgres
ports:
- 5432:5432
volumes:
- ./data/pg_date:/var/lib/postgresql/data/pgdata
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
PGDATA: /var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 1s
timeout: 5s
retries: 3
restart: always
# Сервис для миграции БД Postgresql
flyway:
image: flyway/flyway
container_name: migrate
command: -url=jdbc:postgresql://postgres:5432/${POSTGRES_DB} -schemas=public -user=${POSTGRES_USER} -password=${POSTGRES_PASSWORD} migrate
volumes:
- ./migrate:/flyway/sql
depends_on:
db:
condition: service_healthy
# Сервис MQ
mq:
image: rabbitmq:3.7.5-management
container_name: mq
ports:
- 5672:5672
- 15672:15672
volumes:
- ./data/rabbitmq:/var/lib/rabbitmq/mnesia/rabbit@app-rabbitmq:cached
environment:
RABBITMQ_ERLANG_COOKIE: 6085e2412b6fa88647466c6a81c0cea0
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
RABBITMQ_DEFAULT_VHOST: /