forked from thechangelog/changelog.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
33 lines (31 loc) · 952 Bytes
/
docker-compose.yml
File metadata and controls
33 lines (31 loc) · 952 Bytes
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
version: "3.6"
services:
db:
image: postgres:12.3
# https://docs.docker.com/compose/compose-file/#expose
expose:
- "5432"
# https://docs.docker.com/compose/compose-file/#volumes
volumes:
- postgres:/var/lib/postgresql/data
- ./priv:/app/priv
app:
# Keep this in lock-step with docker/Dockerfile.production
image: thechangelog/runtime:2019-11-27T16.20.17Z
working_dir: /app
command: bash -exec "mix deps.get && ( if (mix deps | grep 'mix deps.compile' 1>/dev/null); then mix deps.compile; fi ) && (cd assets && yarn install) && mix do ecto.create, ecto.migrate, phx.server"
environment:
DB_HOST: db
DB_NAME: changelog_dev
DB_USER: postgres
VIRTUAL_HOST: &host "${HOST:-localhost}"
HOST: *host
# https://docs.docker.com/compose/compose-file/#ports
ports:
- "4000:4000"
volumes:
- ./:/app
depends_on:
- db
volumes:
postgres: