forked from betrybe/backend-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (41 loc) · 924 Bytes
/
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
version: "3"
services:
db:
container_name: blog_api_postgres
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: blog_api
TZ: GMT
ports:
- 5436:5432
elixir:
container_name: blog_api_elixir
build:
context: .
dockerfile: Dockerfile
args:
# Elixir Version: 1.9, 1.10, 1.10.4, ...
VARIANT: "1.11.2"
# Phoenix Version: 1.4.17, 1.5.4, ...
PHOENIX_VERSION: "1.5.7"
volumes:
- .:/app
depends_on:
- db
environment:
MIX_ENV: dev
POSTGRES_DB: blog_api
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST: db
POSTGRES_PORT: 5432
ports:
- 4000:4000
command: sleep infinity
volumes:
postgres-data: