/chatex

A Phoenix chat example

Primary LanguageElixir

chatex

Build Status

Installation

Language & Libraries

First of all, make sure you have Elixir installed by covering the official installation guide on your machine. Alternatively, you can use asdf tool and leverage .tool-versions file to pick the right version of Elixir and Erlang plugins.

Once you have it, you can install and compile all dependencies by running:

mix do deps.get, deps.compile

Finally, you are able to build the project itself like:

mix compile

Database

Ensure you have PostgreSQL available on your machine. You can use either a local installation or a Docker distribution.

The application requires to have a user (role) postgres created with the same password on your localhost under 5432 port.

Later on, create and migrate your database with

mix ecto.setup

Server

To start the application Phoenix server, run:

mix phx.server

Now you can visit localhost:4000 from your browser.

Production

To prepare you application for production, you can use Dockerfile for that. It will require you have Docker installed locally.

To build a Docker image, execute the following command:

docker build . -t chatex:latest

Once built, you are able to push it to a remote repository as:

docker push chatex:latest

It assumes you are authorized and logged in to a Docker registry.

Platform as a Service

From the deployment options, you can choose for example:

Depending on your needs and complexity of your application.