Skip to content

elixir-lang-moscow/site

Repository files navigation

ElixirLangMoscow

Build Status Coverage Status Ebert Docker pulls Docker size

ElixirLangMoscow

Requirements

You will need:

  • erlang
  • elixir
  • node
  • postgres

Or:

  • docker

External services

We do use a bunch of integrations, so if you want to replicate the whole project you will need:

  • Amazon AWS: set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
  • Mailgun: set MAILGUN_API_KEY
  • Timepad: set TIMEPAD_KEY
  • ReCaptcha: set RECAPTCHA_PRIVATE_KEY and RECAPTCHA_PUBLIC_KEY

Docker

To run app in docker container:

  1. Clone the repo
  2. Run docker-compose build
  3. Run docker-compose run web mix test to test the installation
  4. Run docker-compose run web mix ecto.setup && mix ecto.migrate
  5. Run dcoker-compose up

Now you can visit localhost:4000 from your browser.

To clean up:

docker rm -v $(docker ps -a -q -f status=exited)

docker rmi $(docker images -f "dangling=true" -q)

Local

Add these lines to /ets/hosts:

# docker
127.0.0.1       docker.local
127.0.0.1       db

And now, run:

  1. Clone the repo
  2. Run mix deps.get && mix compile
  3. Run mix test to ensure that everything is fine
  4. Run mix ecto.setup && mix ecto.migrate to setup the database
  5. Install Node.js dependencies with yarn install (you may need to install yarn)
  6. Start Phoenix endpoint with mix phoenix.server. Now you can visit localhost:4000 from your browser.

Creating admin account

Run:

mix command.create.admin username:$YOUR_NAME password:$YOUR_PASS password_confirmation:$YOUR_PASS

Development

Frontend

We use hackcss as a css-framework. We use yarn as a default package manager for frontend. And brunch as an assets-builder.

Linters

This project uses several linters to lint 'all the things!!!':

  • credo to lint elixir code
  • eslint to lint javascript code
  • sass-lint to lint scss styles

Learn more