-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (60 loc) · 1.85 KB
/
docker-compose.yml
File metadata and controls
62 lines (60 loc) · 1.85 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
# EquityForge Development Environment
#
# This docker-compose file provides a containerized development environment
# with hot-reloading support. It connects to the PostgreSQL database from
# the CivicTechExchange Django project.
#
# Usage:
# docker compose up # Start in foreground
# docker compose up -d # Start in background
# docker compose down # Stop and remove containers
# docker compose logs -f # View logs
services:
# Phoenix application
phoenix:
build:
context: .
dockerfile: Dockerfile.dev
container_name: equity_forge_phoenix
ports:
- "4000:4000"
environment:
# Database connection (uses CivicTechExchange's PostgreSQL)
DATABASE_HOST: host.docker.internal
DATABASE_PORT: 5432
DATABASE_USER: postgres
DATABASE_PASSWORD: change_me_asap
DATABASE_NAME: postgres
# Phoenix configuration
PHX_HOST: localhost
PHX_PORT: 4000
SECRET_KEY_BASE: s/fsdWzVuXh3vEfxsUiqgrlyr1/lPtNP9ZrUgtHvuYjM+uVBn4C8SSRjr6WJX1vd
# Enable development mode
MIX_ENV: dev
volumes:
# Mount source code for hot-reloading
- ./apps:/app/apps
- ./config:/app/config
- ./mix.exs:/app/mix.exs
- ./mix.lock:/app/mix.lock
# Persist build artifacts
- build:/app/_build
- deps:/app/deps
# Node modules for assets
- node_modules:/app/apps/equity_forge_web/assets/node_modules
extra_hosts:
# Allow container to access host's PostgreSQL
- "host.docker.internal:host-gateway"
stdin_open: true
tty: true
command: sh -c "mix deps.get && mix ecto.create && mix ecto.migrate && mix phx.server"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
build:
deps:
node_modules: