Skip to content

anderson-sousa/code_challenge_back_end

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Challenge Back-End

Installing locally

To run this project, you will need to install the following dependencies on your system:

Dependencie Version
Elixir 1.8.1
Phoenix 1.4.0
PostgreSQL 10.6

Setting up and running

To get started, run the following commands in your project folder:

sudo apt-get install postgis # install postgis
mix deps.get  # installs the dependencies
mix ecto.setup  # creates the database and run migrations
iex -S mix phx.server  # run the application

Now you can visit localhost:4000 from your browser.

Docker

Before execute this commands make sure that Docker and docker-compose are installed and running.

docker-compose build && docker-compose up

Test

To execute the test suits locally:

mix test

API documentation

You can use the content of api.yml to see the docs on Swagger Editor.

Deploy

After clone this project to the server and define the environment variables(SECRET, PGUSER,PGPASSWORD,PGDATABASE), run the following commands:

cp ./config/prod.secret.exs.sample ./config/prod.secret.exs
mix deps.get --only prod
MIX_ENV=prod elixir --detached -S mix do compile, phx.server

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages