apt install elixir npm postgres libmagic-dev
Make sure to run ln -s /usr/bin/nodejs /usr/bin/node
afterwards
To setup for development:
sudo -u postgres psql
create user athel password 'athel';
create database athel_dev owner athel
create database athel_test owner athel
mix deps.get
- pull in dependencies- Setup emagic
mix ecto.migrate
- initialize databasemix test
- run automated tests
Node is only being used as a build system for the (currently non-existent) frontend. This is optional if you only care about NNTP
npm -g install npm
- update npm to the latest versionnpm install
- pull local dependenciesnpm install -g brunch
- will putbrunch
into the path, can be skipped by using =node_modules/brunch/bin/brunch= directly
mix phoenix.server
should get you going, the NNTP server will be running on port 8119
mix test
to run tests. The error output is expected for a few tests for the time being.
Create config/prod.secret.exs
and fill out/copy over the Athel.Nntp
and Athel.Repo configs. Ideally this will be pulled in at runtime
instead of compiletime in the future.
./node_modules/brunch/bin/brunch b -p
builds static assets, and
MIX_ENV=prod mix phoenix.digest
sets them up for caching
Distillery is used to create the release package.
MIX_ENV=prod mix release --env=prod
will generate the release, with --upgrade
added for generating an upgrade release. Make sure that the system
you deploy on is binary compatible with the system that you build on.