forked from code-corps/code-corps-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (53 loc) · 1.12 KB
/
docker-compose.yml
File metadata and controls
59 lines (53 loc) · 1.12 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: "2"
services:
postgres:
image: postgres
expose:
- "5432"
ports:
- 54320:5432
volumes:
- postgres-data:/var/lib/postgresql
elasticsearch:
image: elasticsearch
expose:
- "9200"
web: &api_base
build: .
command: bash -c "mix do deps.get, compile, ecto.create, ecto.migrate, phoenix.server"
depends_on:
- postgres
- elasticsearch
env_file: .env
environment: &api_environment
MIX_ENV: dev
PORT: 4000
DATABASE_POSTGRESQL_HOST: postgres
DATABASE_POSTGRESQL_USERNAME: postgres
links:
- postgres
- elasticsearch
ports:
- 49235:4000
volumes:
- code-corps-api:/code-corps-api
test:
<<: *api_base
depends_on:
- web
environment:
<<: *api_environment
MIX_ENV: test
PORT: 4001
ports:
- 49236:4001
apiary:
image: apiaryio/client
command: preview --server --host=0.0.0.0 --port=8080 --path=/code-corps-api/blueprint/api.apib
ports:
- 8081:8080
volumes:
- code-corps-api:/code-corps-api
volumes:
code-corps-api:
postgres-data: