-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
52 lines (39 loc) · 1.25 KB
/
Dockerfile.dev
File metadata and controls
52 lines (39 loc) · 1.25 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
# Development Dockerfile for EquityForge
# This Dockerfile is optimized for development with hot-reloading
ARG ELIXIR_VERSION=1.19.4
ARG ERLANG_VERSION=28.3
ARG DEBIAN_VERSION=trixie-20251208-slim
FROM hexpm/elixir:${ELIXIR_VERSION}-erlang-${ERLANG_VERSION}-debian-${DEBIAN_VERSION}
# Install build dependencies
RUN apt-get update -y && apt-get install -y \
build-essential \
git \
postgresql-client \
inotify-tools \
curl \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
# Install hex + rebar
RUN mix local.hex --force && \
mix local.rebar --force
# Set working directory
WORKDIR /app
# Install mix dependencies
COPY mix.exs mix.lock ./
COPY config config
COPY apps/equity_forge/mix.exs apps/equity_forge/
COPY apps/equity_forge_web/mix.exs apps/equity_forge_web/
RUN mix deps.get
# Copy application code
COPY . .
# Install Node.js for asset compilation
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
apt-get clean && rm -f /var/lib/apt/lists/*_*
# Install asset dependencies and build tools
RUN mix assets.setup
# Compile the project
RUN mix compile
# Expose Phoenix port
EXPOSE 4000
# Start Phoenix server
CMD ["sh", "-c", "mix ecto.create && mix ecto.migrate && mix phx.server"]