Skip to content

Latest commit

 

History

History
102 lines (90 loc) · 2.71 KB

README.md

File metadata and controls

102 lines (90 loc) · 2.71 KB

Build Status Docs Issues License

Setup Development environment

Required:

Windows

Install with Chocolatey

choco install -y erlang elixir nodejs VisualCppBuildTools

Postgresql needs to be installed separately as chocolatey repository does not have 9.5 version!

Linux

  • Arch
    • pacman -S install erlang elixir nodejs postgresql
  • Fedora 25
    • dnf install -y erlang nodejs postgresql-server
    • Elixir 1.4.0 needs to be installed separatele as fedora repository only has 1.3.1 which is not supported

Project setup

Available commands for project setup: NOTICE: On windows you need to run dev.bat before compiling

mix setup (Setup everything with one command)
mix setup.min (Get dependencies and compile)
mix frontend.install (Install npm packages to frontend)
mix frontend.build (Build minified javascript)
mix db.setup (Setup database)
mix db.reset (Reset database)

Running the application

iex -S mix (Start console for program)
mix run --no-halt (Run program)

Running test

mix test (Run unit tests)
mix lint (Run linter)

Create release build for deployment

Create release build

MIX_ENV=prod COOKIE=*secret cookie* mix release --env=prod

Copy tar.gz to rel/files

cp _build/prod/rel/kuikka_website/releases/*version*/kuikka_website.tar.gz
rel/files

Now you can pack rel/files to either zip or tar.gz

Deploying release

Install

sudo make install

Now you can change the setting

sudo vi /etc/kuikka-website/kuikka-website.conf

Then start

sudo systemctl start kuikka-website

Update

sudo make update

Uninstall

sudo make uninstall