-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
73 lines (56 loc) · 2.44 KB
/
Copy pathDockerfile
File metadata and controls
73 lines (56 loc) · 2.44 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
63
64
65
66
67
68
69
70
71
72
73
FROM elixir:1.18-otp-27-slim AS builder
RUN apt-get update && apt-get install -y \
gcc g++ make \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY mix.exs mix.lock ./
RUN mix local.hex --force && mix local.rebar --force
RUN MIX_ENV=prod mix deps.get && MIX_ENV=prod mix deps.compile
COPY *.ex ./
RUN MIX_ENV=prod mix release
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
apache2 libapache2-mod-php \
php-cli php-json php-curl php-imap php-mbstring php-xml php-sqlite3 \
python3 python3-pip python3-venv \
curl git inotify-tools openssh-client rsync \
libncurses6 libstdc++6 openssl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install --no-cache-dir \
sentence-transformers numpy sqlite-vec \
playwright playwright-stealth pexpect \
piper-tts faster-whisper
RUN playwright install chromium && playwright install-deps chromium
WORKDIR /app
COPY --from=builder /app/_build/prod/rel/cns_app ./rel/cns_app
COPY tools/ ./tools/
COPY memory/ ./memory/
COPY config/ ./config/
COPY MLModels/ ./MLModels/
COPY cron/ ./cron/
COPY threads/ ./threads/
COPY docker/start.sh ./docker/start.sh
COPY data/ ./data/
COPY CLAUDE.md lenses.json settings.txt ./
COPY index.html ./
RUN groupadd -r ala && useradd -r -g ala -d /app ala
# Claude Code CLI, installed into /app/.local so the ala user (HOME=/app) owns
# and can auto-update it. Agents invoke plain "claude" from PATH.
RUN curl -fsSL https://claude.ai/install.sh | HOME=/app bash
ENV PATH="/app/.local/bin:$PATH"
RUN mkdir -p threads/prompts threads/output threads/flags threads/incoming \
threads/channels threads/audio threads/uploads threads/goals \
work/coding/queue work/research/queue work/impulse work/reports/archive \
work/interactive/sessions work/interactive/commands work/interactive/responses \
work/evidence work/learning workers autologs reflexes \
loghistory projectfiles
RUN chown -R ala:ala /app && chmod +x /app/docker/start.sh
RUN echo 'ServerName localhost' >> /etc/apache2/apache2.conf \
&& sed -i 's/^export APACHE_RUN_USER=.*/export APACHE_RUN_USER=ala/' /etc/apache2/envvars \
&& sed -i 's/^export APACHE_RUN_GROUP=.*/export APACHE_RUN_GROUP=ala/' /etc/apache2/envvars
RUN chown -R ala:ala /var/run/apache2 /var/log/apache2 || true
RUN mkdir -p /var/lock/apache2 && chown ala:ala /var/lock/apache2 || true
EXPOSE 80 9500
CMD ["/app/docker/start.sh"]