Skip to content

Repository files navigation

API

Setup guide

To start your Phoenix app:

  • Install dependencies with mix deps.get
  • Add the necessary variables to your environment
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Start Phoenix endpoint with mix server

Deploy

We're using edeliver. We're using cold deploys, not upgrades. The deployment process is done using the following commands:

  • mix edeliver build release
  • mix edeliver deploy release production
  • mix edeliver restart production
  • mix edeliver migrate production

Note that trying to stop the api from edeliver won't be too successfull as systemd will notice its absence and restart it immediatly.

We try to preserve our deps' built files. If you need to clean those for some reason, run GIT_CLEAN_PATHS=. mix edeliver build release.

Environment Variables

Use your preferred method to add the following variables to your environment. You can find an example env file you can source in share/env/env

VariableDescriptionEnvironments
AI_CALLBACK_URLAI Competition callback urlAll
AI_SERVER_HOSTAI Competition server hostAll
AI_SERVER_TOKENAI Competition access tokenAll
DATABASE_URLPostgresql database urlAll
GITHUB_TOKENGithub API access tokenAll
HOSTServer urlAll
MAILGUN_API_DOMAINMailgun API credentialsProd
MAILGUN_API_KEYMailgun API credentialsProd
PORTPort configurationProd
SECRET_KEY_BASESecret key baseAll
SENTRY_DSNSentry.io project urlProd
SLACK_TOKENSlack API access tokenProd

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages