Development Environment
If you want to contribute to Claper, you can set up a development environment on your machine.
Setting up a development environment
Docker setup
To set up a development environment with Docker, you need to have Docker installed on your machine.
- Clone the repo
sh
git clone https://github.com/ClaperCo/Claper.git- Go to the project directory
sh
cd Claper- Run Docker compose
sh
docker compose -f compose.dev.yml upManual setup
To set up a development environment, you need to have the prerequisites installed on your machine.
- Clone the repo
sh
git clone https://github.com/ClaperCo/Claper.git- Go to the project directory
sh
cd Claper- Configure your environment variables
sh
cp .env.sample .envEdit the .env file to match your configuration.
- Install dependencies
sh
mix deps.get- Create your database
sh
mix ecto.create- Migrate your database
sh
mix ecto.migrate- Install JS dependencies
sh
cd assets && npm i- Allow execution of startup file
sh
chmod +x ./dev.sh- Start Phoenix endpoint with
sh
./dev.sh startDatabase
You need a PostgreSQL database running on your machine. You can run it with a Docker container: docker run -p 5432:5432 -e POSTGRES_PASSWORD=claper -e POSTGRES_USER=claper -e POSTGRES_DB=claper --name claper-db -d postgres:15.
Now you can visit localhost:4000 from your browser.
If you have configured MAIL environment variable to local, you can access to the mailbox at localhost:4000/dev/mailbox.