Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "palpo-and-octos-deploy/repos/palpo"]
path = palpo-and-octos-deploy/repos/palpo
url = https://github.com/palpo-im/palpo.git
[submodule "palpo-and-octos-deploy/repos/octos"]
path = palpo-and-octos-deploy/repos/octos
url = https://github.com/octos-org/octos.git
3 changes: 1 addition & 2 deletions palpo-and-octos-deploy/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Runtime data (created by docker compose)
data/

# Source repos cloned by setup.sh
repos/
# Source repos are now git submodules (tracked in .gitmodules)

# User's local env file (contains API keys)
.env
Expand Down
8 changes: 7 additions & 1 deletion palpo-and-octos-deploy/palpo.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@

FROM rust:bookworm AS builder
WORKDIR /work
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN rm -rf /var/lib/apt/lists/* /var/lib/apt/extended_states /var/cache/apt/archives/*.deb \
&& apt-get clean \
&& apt-get update \
&& dpkg --configure -a || true \
&& apt-get install -y --no-install-recommends \
libclang-dev libpq-dev cmake \
&& rm -rf /var/lib/apt/lists/*
COPY ./repos/palpo .
ENV CARGO_PROFILE_RELEASE_LTO=false
ENV CARGO_PROFILE_RELEASE_CODEGEN_UNITS=4
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/work/target \
cargo build --release && cp target/release/palpo /usr/local/bin/palpo
Expand Down
1 change: 1 addition & 0 deletions palpo-and-octos-deploy/repos/octos
Submodule octos added at 15cf07
1 change: 1 addition & 0 deletions palpo-and-octos-deploy/repos/palpo
Submodule palpo added at cf6aee
17 changes: 3 additions & 14 deletions palpo-and-octos-deploy/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,14 @@
# Robrix + Palpo + Octos — One-time Setup
# ============================================================
# Run this once before "docker compose up -d".
# It clones the required source repos and prepares .env.
# It initializes git submodules and prepares .env.
# ============================================================
set -e

cd "$(dirname "$0")"

echo "==> Cloning Palpo (Matrix homeserver)..."
if [ -d repos/palpo ]; then
echo " repos/palpo already exists, skipping."
else
git clone --depth 1 https://github.com/palpo-im/palpo.git repos/palpo
fi

echo "==> Cloning Octos (AI bot)..."
if [ -d repos/octos ]; then
echo " repos/octos already exists, skipping."
else
git clone --depth 1 --recurse-submodules=no https://github.com/octos-org/octos.git repos/octos
fi
echo "==> Initializing git submodules (Palpo + Octos)..."
git submodule update --init --depth 1 repos/palpo repos/octos

if [ ! -f .env ]; then
cp .env.example .env
Expand Down