A toy project for Elixir build

theenglishway (time) 25310530f2 Document running in development mode 4 years ago
assets b8aef69bd4 Initial commit 4 years ago
config 25310530f2 Document running in development mode 4 years ago
lib b8aef69bd4 Initial commit 4 years ago
priv b8aef69bd4 Initial commit 4 years ago
test b8aef69bd4 Initial commit 4 years ago
.formatter.exs b8aef69bd4 Initial commit 4 years ago
.gitignore b8aef69bd4 Initial commit 4 years ago
README.md 25310530f2 Document running in development mode 4 years ago
mix.exs b8aef69bd4 Initial commit 4 years ago
mix.lock b8aef69bd4 Initial commit 4 years ago

README.md

Toy

This project is intended to be a (serious) playground for other Elixir projects of mine in the aspects of build, integration and deployment.

Goals

  • [] Document build
  • [] Implement and document cross-build
  • [] Install the project as a systemd service
  • [] Handle the current version via a git tag
  • [] Build as dev or prod

Preconditions

PostgreSQL role

In dev as well as in prod modes, the role used in config/#{mode}.exs must be created using e.g. the command line : sudo -u postgres createuser -P role_name

(add -d flag to allow database creation)

PostgreSQL database

In dev as well as in prod modes, the role used in config/#{mode}.exs must be created using e.g. the command line : sudo -u postgres createdb -O role_name db_name

Running the server

In development mode

The PostgreSQL role/database must be installed, if required.

To start the server in dev mode :

  • Install dependencies with mix deps.get
  • Install Node.js dependencies with mix cmd npm install --prefix assets
  • Start the server : mix phx.server or iex -S mix phx.server to run within a shell

The server can now be accessed on localhost:4000.