-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathdocker-compose.yml
77 lines (68 loc) · 1.65 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
version: '3.6'
services:
app:
container_name: projecthub
image: "${IMAGE:-projecthub-app}:${IMAGE_TAG:-latest}"
build:
context: .
cache_from:
- "${REGISTRY_HOST:-local}/projecthub/${BRANCH:-master}:${IMAGE_TAG:-test}"
dockerfile: Dockerfile
target: ${DOCKER_BUILD_TARGET:-dev}
args:
- BUILD_ENV=test
ssh:
- default
command: "mix run --no-halt"
ports:
- "50051"
tty: true
volumes:
- .:/app
- mix-deps:/app/deps
- mix-build:/app/_build
- ./out:/app/out
links:
- db:db
- rabbitmq:rabbitmq
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
environment:
IN_DOCKER: "true"
POSTGRES_DB_NAME: "projecthub"
POSTGRES_DB_USER: "postgres"
POSTGRES_DB_PASSWORD: "the-cake-is-a-lie"
POSTGRES_DB_HOST: "db"
POSTGRES_DB_POOL_SIZE: "5"
START_INTERNAL_API: "true"
AMQP_URL: "amqp://rabbitmq:5672"
CI: $CI
MIX_ENV: ${MIX_ENV:-dev}
db:
image: postgres:9.6
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: "the-cake-is-a-lie"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 5
rabbitmq:
image: rabbitmq:3-management
environment:
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbit log_levels [{connection,error}]"
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 3s
timeout: 3s
retries: 5
volumes:
postgres-data:
driver: local
mix-deps:
mix-build: