-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
32 lines (31 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
version: "3.7"
services:
postgres:
image: "postgres:alpine"
restart: always
environment:
POSTGRES_DB: "${POSTGRES_DB:-awesome_elixir}"
POSTGRES_USER: "${POSTGRES_USER:-postgres}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-postgres}"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 30s
timeout: 10s
retries: 5
volumes:
- "postgres_data:/var/lib/postgresql/data"
web:
build: .
restart: always
environment:
DATABASE_URL: "ecto://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres/${POSTGRES_DB:-awesome_elixir}"
GITHUB_CLIENT_ID: "${GITHUB_CLIENT_ID}"
GITHUB_CLIENT_TOKEN: "${GITHUB_CLIENT_TOKEN}"
GUARDIAN_SECRET_KEY: "${GUARDIAN_SECRET_KEY}"
SECRET_KEY_BASE: "${SECRET_KEY_BASE}"
ports:
- "${PORT:-4001}:4000"
depends_on:
- postgres
volumes:
postgres_data: