-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
62 lines (59 loc) · 1.97 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
62 lines (59 loc) · 1.97 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
60
61
62
# Local Docker dev stack: builds the image from this checkout and runs
# the release the same way the production stack does, but with a separate
# volume and OAuth creds drawn from your local .env's DEV_* vars.
#
# docker compose -f docker-compose.dev.yml up --build
#
# The dev compose reads DEV_GITHUB_CLIENT_ID / DEV_GITHUB_CLIENT_SECRET
# (the same vars `mix phx.server` uses) and maps them onto the
# release-time GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET the container
# expects. If DEV_* are unset, they default to "dummy" so migrations and
# the health endpoint can boot for a smoke test; real OAuth won't work
# until you fill them in in .env.
services:
migrate:
build:
context: .
dockerfile: Dockerfile
image: centauri:dev
container_name: centauri-migrate-dev
environment:
GITHUB_CLIENT_ID: ${DEV_GITHUB_CLIENT_ID:-dummy}
GITHUB_CLIENT_SECRET: ${DEV_GITHUB_CLIENT_SECRET:-dummy}
PHX_HOST: ${PHX_HOST:-localhost}
DATABASE_PATH: ${DATABASE_PATH:-/data/centauri_dev.db}
SECRET_KEY_BASE: ${SECRET_KEY_BASE:-}
volumes:
- centauri_dev_data:/data
command: ["bin/migrate"]
restart: "no"
centauri:
build:
context: .
dockerfile: Dockerfile
image: centauri:dev
container_name: centauri-dev
restart: unless-stopped
depends_on:
migrate:
condition: service_completed_successfully
environment:
GITHUB_CLIENT_ID: ${DEV_GITHUB_CLIENT_ID:-dummy}
GITHUB_CLIENT_SECRET: ${DEV_GITHUB_CLIENT_SECRET:-dummy}
PHX_HOST: ${PHX_HOST:-localhost}
DATABASE_PATH: ${DATABASE_PATH:-/data/centauri_dev.db}
SECRET_KEY_BASE: ${SECRET_KEY_BASE:-}
PORT: 4000
ports:
- "${CENTAURI_HTTP_PORT:-8080}:4000"
volumes:
- centauri_dev_data:/data
healthcheck:
test: ["CMD", "curl", "-fs", "http://localhost:4000/health"]
interval: 30s
timeout: 10s
start_period: 30s
retries: 3
volumes:
centauri_dev_data:
name: centauri_dev_data