Skip to content

Installation

Cristiano Carvalho edited this page Apr 2, 2026 · 13 revisions

Three deployment modes: standalone, embedded, or Docker.

Prerequisites

  • Elixir 1.17+
  • PostgreSQL 12+
  • ImageMagick (optional, for PDF conversion)

Standalone Application

1. Clone the Repository

git clone https://github.com/your-org/aludel.git
cd aludel

2. Install Dependencies

mix deps.get

3. Configure Database

Update config/dev.exs:

config :aludel, Aludel.Repo,
  username: "postgres",
  password: "postgres",
  hostname: "localhost",
  database: "aludel_dev",
  pool_size: 10

4. Setup Database

mix ecto.setup

Creates database, runs migrations, and seeds demo data.

5. Start the Server

mix phx.server

Access at http://localhost:4000.

Embedded Mode

Embed as a Hex package in existing Phoenix apps.

1. Add Dependency

In your mix.exs:

def deps do
  [
    {:aludel, "~> 0.1.12"}
  ]
end

2. Install and Configure

mix deps.get
mix aludel.install

3. Configure Repository

In config/config.exs:

config :aludel,
  repo: YourApp.Repo,
  ecto_repos: [YourApp.Repo]

4. Run Migrations

mix ecto.migrate

5. Mount in Router

In lib/your_app_web/router.ex:

scope "/admin" do
  pipe_through [:browser, :require_authenticated_user]

  live_session :aludel,
    on_mount: [{AludelWeb.Authentication, :ensure_authenticated}] do
    AludelWeb.Router.aludel_routes("/aludel")
  end
end

Docker Deployment

1. Clone Repository

git clone https://github.com/your-org/aludel.git
cd aludel

2. Create Environment File

Copy .env.example to .env:

DATABASE_URL=postgres://postgres:postgres@db:5432/aludel_prod
SECRET_KEY_BASE=your_secret_key_here
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
PHX_HOST=localhost

3. Start Services

docker-compose up -d

Access at http://localhost:4000.

Environment Variables

export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
# Ollama: no API key required

Verification

mix test

Next Steps

Clone this wiki locally