This is Phoenix web application for representation of Awesome Elixir list of libraries with an additional info such as: amount of stars, number of days since the last push. It is possible to filter libraries by min number of stars, by using /?min_stars=n parameter.
- Check .env file, make sure all the env variables set:
- My Awesome List Web service env variables:
- MIX_ENV - MIX_ENV to use to build app at build of docker image;
- SECRET_KEY_BASE - used to encrypt and sign session to db, could be generated with
mix phx.gen.secret; - GITHUB_API_TOKEN - Github API Token
- PORT - Phoenix Endpoint port(inside container);
- Postgres db env variables:
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- My Awesome List Web service env variables:
- Configure other
portsin docker-compose.yaml if you would like - Build services
docker-compose build - Start services with
docker-compose up
Now you can visit localhost:4001 from your browser.
- Install dependencies with
mix deps.get - Install Node.js dependencies with
npm installinside theassetsdirectory - Setup postgresql db on localhost
- Configure db connection options in
dev.exsif needed.- Defaults:
- username: "postgres",
- password: "postgres",
- database: "my_awesome_list_dev",
- hostname: "localhost",
- Defaults:
- Create and migrate database with
mix ecto.setup - Add your GitHub Api Token value in
dev.secret.exs - Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000 from your browser.
mix deps.getMIX_ENV=test mix ecto.resetmix test