mirror of
https://github.com/ClaperCo/Claper.git
synced 2026-02-24 12:09:59 +01:00
183 lines
7.5 KiB
HTML
183 lines
7.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="generator" content="ExDoc v0.28.4">
|
|
<meta name="project" content="Claper v1.2.1">
|
|
|
|
<title>Local installation — Claper v1.2.1</title>
|
|
<link rel="stylesheet" href="dist/elixir-b6f1ed5df9b1d42a7309.css" />
|
|
|
|
<script src="dist/sidebar_items-a1513a6c5c.js"></script>
|
|
|
|
<script src="docs_config.js"></script>
|
|
|
|
<script async src="dist/app-bd1cb213813bf4825aa2.js"></script>
|
|
|
|
|
|
</head>
|
|
<body data-type="extras">
|
|
<script>
|
|
|
|
try {
|
|
var settings = JSON.parse(localStorage.getItem('ex_doc:settings') || '{}');
|
|
|
|
if (settings.theme === 'dark' ||
|
|
((settings.theme === 'system' || settings.theme == null) &&
|
|
window.matchMedia('(prefers-color-scheme: dark)').matches)
|
|
) {
|
|
document.body.classList.add('dark')
|
|
}
|
|
} catch (error) { }
|
|
</script>
|
|
|
|
<div class="main">
|
|
|
|
|
|
<section class="sidebar">
|
|
<button class="sidebar-button sidebar-toggle" aria-label="toggle sidebar">
|
|
<i class="ri-menu-line ri-lg" title="Collapse/expand sidebar"></i>
|
|
</button>
|
|
|
|
<form class="sidebar-search" action="search.html">
|
|
<button type="submit" class="search-button" aria-label="Submit Search">
|
|
<i class="ri-search-2-line" aria-hidden="true" title="Submit search"></i>
|
|
</button>
|
|
<button type="button" tabindex="-1" class="search-close-button" aria-label="Cancel Search">
|
|
<i class="ri-close-line ri-lg" aria-hidden="true" title="Cancel search"></i>
|
|
</button>
|
|
<label class="search-label">
|
|
<p class="sr-only">Search</p>
|
|
<input name="q" type="text" class="search-input" placeholder="Search..." aria-label="Input your search terms" autocomplete="off" />
|
|
</label>
|
|
</form>
|
|
|
|
<div class="autocomplete">
|
|
<div class="autocomplete-results">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="sidebar-header">
|
|
|
|
<a href="https://get.claper.co">
|
|
<img src="assets/logo.png" alt="Claper" class="sidebar-projectImage">
|
|
</a>
|
|
|
|
<div class="sidebar-projectDetails">
|
|
<a href="https://get.claper.co" class="sidebar-projectName" translate="no">
|
|
Claper
|
|
</a>
|
|
<strong class="sidebar-projectVersion" translate="no">
|
|
v1.2.1
|
|
</strong>
|
|
</div>
|
|
<ul class="sidebar-listNav">
|
|
<li><a id="extras-list-link" href="#full-list">GUIDES</a></li>
|
|
|
|
<li><a id="modules-list-link" href="#full-list">Modules</a></li>
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="gradient"></div>
|
|
<ul id="full-list" class="sidebar-fullList"></ul>
|
|
</section>
|
|
|
|
<section class="content">
|
|
<output role="status" id="toast"></output>
|
|
<div class="content-outer">
|
|
<div id="content" class="content-inner">
|
|
|
|
<h1>
|
|
<button class="settings display-settings">
|
|
<i class="ri-settings-3-line"></i>
|
|
<span class="sr-only">Settings</span>
|
|
</button>
|
|
|
|
|
|
<a href="https://github.com/ClaperCo/Claper/blob/main/guides/introduction/installation.md#L1" title="View Source" class="view-source" rel="help">
|
|
<i class="ri-code-s-slash-line" aria-hidden="true"></i>
|
|
<span class="sr-only">View Source</span>
|
|
</a>
|
|
|
|
<span>Local installation</span>
|
|
</h1>
|
|
|
|
<h2 id="prerequisites" class="section-heading">
|
|
<a href="#prerequisites" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
|
|
<p class="sr-only">prerequisites</p>
|
|
</a>
|
|
Prerequisites
|
|
</h2>
|
|
<p>To run Claper on your local environment you need to have:</p><ul><li>Postgres >= 9</li><li>Elixir >= 1.13.2</li><li>Erlang >= 24</li><li>NPM >= 6.14.17</li><li>NodeJS >= 14.19.2</li><li>Ghostscript >= 9.5.0 (for PDF support)</li><li>Libreoffice >= 6.4 (for PPT/PPTX support)</li></ul><p>You can also use Docker to easily run a Postgres instance:</p><pre><code class="makeup sh" translate="no"><span class=""> docker run -p 5432:5432 -e POSTGRES_PASSWORD=claper -e POSTGRES_USER=claper -e POSTGRES_DB=claper --name claper-db -d postgres:9
|
|
</span></code></pre><ol><li>Clone the repo<pre><code class="makeup sh" translate="no"><span class=""> git clone https://github.com/ClaperCo/Claper.git
|
|
</span></code></pre></li><li>Install dependencies<pre><code class="makeup sh" translate="no"><span class=""> mix deps.get
|
|
</span></code></pre></li><li>Migrate your database<pre><code class="makeup sh" translate="no"><span class=""> mix ecto.migrate
|
|
</span></code></pre></li><li>Install JS dependencies<pre><code class="makeup sh" translate="no"><span class=""> cd assets && npm i
|
|
</span></code></pre></li><li>Allow execution of startup file<pre><code class="makeup sh" translate="no"><span class=""> chmod +x ./start.sh
|
|
</span></code></pre></li><li>Start Phoenix endpoint with<pre><code class="makeup sh" translate="no"><span class=""> ./start.sh
|
|
</span></code></pre></li></ol><p>Now you can visit <a href="http://localhost:4000"><code class="inline">localhost:4000</code></a> from your browser.</p><p>If you have configured <code class="inline">MAIL</code> to <code class="inline">local</code>, you can access to the mailbox at <a href="http://localhost:4000/dev/mailbox"><code class="inline">localhost:4000/dev/mailbox</code></a>.</p><h2 id="using-docker" class="section-heading">
|
|
<a href="#using-docker" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
|
|
<p class="sr-only">using-docker</p>
|
|
</a>
|
|
Using Docker
|
|
</h2>
|
|
<p>You can build the app with Docker:</p><pre><code class="makeup sh" translate="no"><span class="">docker build -t claper .
|
|
</span><span class="">docker run -p 4000:4000 claper
|
|
</span></code></pre><p>or you can use the official Docker image:</p><pre><code class="makeup sh" translate="no"><span class="">docker run -p 4000:4000 ghcr.io/claperco/claper:main
|
|
</span></code></pre><p>Do not forget to set the environment variables in the docker run command with <code class="inline">docker run -e DATABASE_URL=claper-db -e MAIL=local ...</code>.</p><h3 id="arm-architecture" class="section-heading">
|
|
<a href="#arm-architecture" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
|
|
<p class="sr-only">arm-architecture</p>
|
|
</a>
|
|
ARM architecture
|
|
</h3>
|
|
<p>If you are using an ARM architecture (like Apple M1), the original Docker image won't work. You can build the image yourself by replacing the <code class="inline">BUILDER_IMAGE</code> argument in the <code class="inline">Dockerfile</code> with <code class="inline">ARG BUILDER_IMAGE="hexpm/elixir-arm64:1.13.2-erlang-24.2.1-debian-bullseye-20210902-slim"</code> and then build the image as described above.</p>
|
|
<div class="bottom-actions">
|
|
<div class="bottom-actions-item">
|
|
|
|
<a href="configuration.html" class="bottom-actions-button" rel="prev">
|
|
<span class="subheader">
|
|
← Previous Page
|
|
</span>
|
|
<span class="title">
|
|
Configuration
|
|
</span>
|
|
</a>
|
|
|
|
</div>
|
|
<div class="bottom-actions-item">
|
|
|
|
<a href="deployment.html" class="bottom-actions-button" rel="next">
|
|
<span class="subheader">
|
|
Next Page →
|
|
</span>
|
|
<span class="title">
|
|
Deployment
|
|
</span>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="footer">
|
|
|
|
<p>
|
|
Built using
|
|
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener" translate="no">ExDoc</a> (v0.28.4) for the
|
|
|
|
<a href="https://elixir-lang.org" title="Elixir" target="_blank" translate="no">Elixir programming language</a>
|
|
|
|
</p>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
|
|
</body>
|
|
</html>
|