2022-11-30 23:03:57 +01:00
# Local installation
2022-07-28 15:54:20 +02:00
## Prerequisites
To run Claper on your local environment you need to have:
2024-04-06 11:48:47 +02:00
- Postgres >= 9
- Elixir >= 1.13.2
- Erlang >= 24
- NPM >= 6.14.17
- NodeJS >= 14.19.2
- Ghostscript >= 9.5.0 (for PDF support)
- Libreoffice >= 6.4 (for PPT/PPTX support)
2022-07-28 15:54:20 +02:00
You can also use Docker to easily run a Postgres instance:
2024-04-06 11:48:47 +02:00
2022-07-28 15:54:20 +02:00
```sh
2024-04-06 11:48:47 +02:00
docker run -p 5432:5432 -e POSTGRES_PASSWORD=claper -e POSTGRES_USER=claper -e POSTGRES_DB=claper --name claper-db -d postgres:15
```
2022-07-28 15:54:20 +02:00
1. Clone the repo
```sh
git clone https://github.com/ClaperCo/Claper.git
```
2. Install dependencies
```sh
mix deps.get
```
3. Migrate your database
```sh
mix ecto.migrate
```
4. Install JS dependencies
```sh
cd assets && npm i
```
5. Allow execution of startup file
```sh
chmod +x ./start.sh
```
6. Start Phoenix endpoint with
```sh
./start.sh
```
Now you can visit [`localhost:4000` ](http://localhost:4000 ) from your browser.
If you have configured `MAIL` to `local` , you can access to the mailbox at [`localhost:4000/dev/mailbox` ](http://localhost:4000/dev/mailbox ).
2023-02-26 22:38:54 +01:00
## Using Docker Compose
2022-07-28 15:54:20 +02:00
2023-02-26 22:38:54 +01:00
A Docker Compose [reference file ](https://github.com/ClaperCo/Claper/blob/main/docker-compose.yml ) is provided in the repository. You can use it to run Claper with Docker Compose.
2022-09-05 21:27:02 +02:00
```sh
2023-02-26 22:38:54 +01:00
git clone https://github.com/ClaperCo/Claper.git
cd Claper
2023-12-01 12:31:12 +01:00
docker compose up
2022-10-14 19:42:42 +02:00
```
### ARM architecture
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 `BUILDER_IMAGE` argument in the `Dockerfile` with `ARG BUILDER_IMAGE="hexpm/elixir-arm64:1.13.2-erlang-24.2.1-debian-bullseye-20210902-slim"` and then build the image as described above.