-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (45 loc) · 1.14 KB
/
docker-compose.yml
File metadata and controls
48 lines (45 loc) · 1.14 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
version: "3.9"
services:
db:
image: postgres:16-alpine
container_name: context_engineer_db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: context_engineering_dev
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d context_engineering_dev"]
interval: 10s
timeout: 5s
retries: 5
api:
build:
context: .
dockerfile: infra/docker/Dockerfile.api
container_name: context_engineer_api
depends_on:
db:
condition: service_healthy
environment:
MIX_ENV: dev
PHX_SERVER: "true"
DATABASE_URL: ecto://postgres:postgres@db:5432/context_engineering_dev
SECRET_KEY_BASE: dev_only_replace_in_prod
PORT: "4000"
PHX_HOST: localhost
ports:
- "4000:4000"
volumes:
- ./:/app
- elixir_deps:/app/deps
- elixir_build:/app/_build
command: >
sh -c "mix deps.get && mix ecto.create && mix ecto.migrate && mix phx.server"
volumes:
postgres_data:
elixir_deps:
elixir_build: