-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
41 lines (38 loc) · 945 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
version: '3'
services:
phoenix:
build:
context: ./
dockerfile: ./docker/app/Dockerfile
depends_on:
- postgres
environment:
POSTGRES_HOST: ${PG_HOST}
POSTGRES_PORT: ${PG_PORT}
POSTGRES_DB: ${PG_DB}
POSTGRES_DB_TEST: ${PG_DB_TEST}
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PWD}
ports:
- 4000:4000 # App
- 4002:4002 # Test
volumes:
- .:/app
- /app/deps
- /app/assets/node_modules
postgres:
image: postgres
environment:
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PWD}
POSTGRES_DB: ${PG_DB}
PG_DATA: /var/lib/postgresql/data/pgdata
POOL: 100
restart: always
ports:
- 15432:5432
volumes:
- pgdata:/var/lib/postgresql/data
- ./docker/postgres/scripts:/docker-entrypoint-initdb.d # Comment this line to prevent test db from being created
volumes:
pgdata: