Files
Claper/installation.html

207 lines
8.6 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.29.4">
<meta name="project" content="Claper v1.7.0">
<title>Local installation — Claper v1.7.0</title>
<link rel="stylesheet" href="dist/html-elixir-HHVY3JYD.css" />
<script src="dist/handlebars.runtime-NWIB6V2M.js"></script>
<script src="dist/handlebars.templates-XWGFFSCD.js"></script>
<script src="dist/sidebar_items-E6912480.js"></script>
<script src="docs_config.js"></script>
<script async src="dist/html-JDI3AVDD.js"></script>
</head>
<body data-type="extras" class="page-extra">
<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">
<button class="sidebar-button sidebar-toggle" aria-label="toggle sidebar">
<i class="ri-menu-line ri-lg" title="Collapse/expand sidebar"></i>
</button>
<section class="sidebar">
<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" autocorrect="off" autocapitalize="off" spellcheck="false" />
</label>
</form>
<div class="autocomplete">
<div class="autocomplete-results">
</div>
</div>
<div class="sidebar-header">
<a href="https://claper.co">
<img src="assets/logo.png" alt="Claper" class="sidebar-projectImage">
</a>
<div class="sidebar-projectDetails">
<a href="https://claper.co" class="sidebar-projectName" translate="no">
Claper
</a>
<div class="sidebar-projectVersion" translate="no">
v1.7.0
</div>
</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"></ul>
</section>
<section class="content">
<output role="status" id="toast"></output>
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<button class="icon-action 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="icon-action" 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 &gt;= 9</li><li>Elixir &gt;= 1.13.2</li><li>Erlang &gt;= 24</li><li>NPM &gt;= 6.14.17</li><li>NodeJS &gt;= 14.19.2</li><li>Ghostscript &gt;= 9.5.0 (for PDF support)</li><li>Libreoffice &gt;= 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 &amp;&amp; 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-compose" class="section-heading">
<a href="#using-docker-compose" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">using-docker-compose</p>
</a>
Using Docker Compose
</h2>
<p>A Docker Compose <a href="https://github.com/ClaperCo/Claper/blob/main/docker-compose.yml">reference file</a> is provided in the repository. You can use it to run Claper with Docker Compose.</p><pre><code class="makeup sh" translate="no"><span class="">git clone https://github.com/ClaperCo/Claper.git
</span><span class="">cd Claper
</span><span class="">docker compose up
</span></code></pre><h2 id="using-docker-compose-for-dev" class="section-heading">
<a href="#using-docker-compose-for-dev" class="hover-link"><i class="ri-link-m" aria-hidden="true"></i>
<p class="sr-only">using-docker-compose-for-dev</p>
</a>
Using Docker Compose for Dev
</h2>
<p>To easy check new features, it is possible to directly build the Docker image from the source code and run the container with the <a href="https://github.com/ClaperCo/Claper/blob/main/docker-compose-dev.yml">docker-compose-dev.yml</a> file.</p><pre><code class="makeup sh" translate="no"><span class="">git clone https://github.com/ClaperCo/Claper.git
</span><span class="">cd Claper
</span><span class="">docker compose -f docker-compose-dev.yml up
</span></code></pre><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=&quot;hexpm/elixir-arm64:1.13.2-erlang-24.2.1-debian-bullseye-20210902-slim&quot;</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>
<span class="line">
<button class="a-main footer-button display-quick-switch" title="Search HexDocs packages">
Search HexDocs
</button>
<a href="Claper.epub" title="ePub version">
Download ePub version
</a>
</span>
</p>
<p class="built-using">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener" translate="no">ExDoc</a> (v0.29.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>