These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
The following software is required to be installed on your system:
- Erlang 26+
- Elixir 1.14+
- PostgreSQL 13+(see this section for setting up with docker)
We recommend using asdf version manager to install and manage all the programming languages' requirements.
If you prefer to use docker, see the section below.
First, clone the repository:
git clone git@github.com:cesium/atomic.git
cd atomic
git checkout develop
Then, run the setup script to get all dependencies configured. Make sure the database is up and running.
bin/setup
Then you should change the .env.dev
file as needed. Run this script again if
needed.
Start the development server and then you can visit http://localhost:4000
from your browser.
bin/server
Run the tests.
bin/test
Lint your code.
bin/lint
Format your code.
bin/format
For data persistence this project uses a PostgreSQL database. You should have PostgreSQL up and running.
If you want to setup the required database using docker containers you can easily do it with docker-compose.
Create and start the database containers. You should use linux.yml
if running on Linux and darwin.yml
if running on macOS.
cp .env.dev.sample .env.dev
docker-compose -f docker-compose.dev.yml -f {linux,darwin}.yml up db
Start the previously created containers.
docker-compose -f docker-compose.dev.yml -f {linux,darwin}.yml start
Stop the containers.
docker-compose -f docker-compose.dev.yml -f {linux,darwin}.yml stop
Destroy the containers and volumes created.
docker-compose -f docker-compose.dev.yml -f {linux,darwin}.yml down -v
You can use these resources to learn more about the technologies this project uses.