To start your Phoenix server:
mix setup
to install and setup dependenciessource .env
mix phx.server
or inside IEx with iex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
.env
expected variablesexport GOOGLE_CLIENT_ID="********"
export ROOT_ADMIN_EMAIL="some.email@example.com"
We use Gettext for localization.
mix gettext.extract # to extract gettext() calls to .pot
mix gettext.merge priv/gettext # to update all locale-specific .po
Currently supported locales are en
(default) and pt_BR
.
git_hooks
issueWe need to run mix git_hooks.install
before commiting for the first time.
See this issue
We're currently running Lanttern on fly.io, connected to a managed Supabase Postgresql database, and we use GitHub Actions for automation.
The main secrets/env vars that we need for this are the following:
FLY_API_TOKEN
for each environmentDATABASE_HOST
- used in repo's ssl_opts
server_name_indication
DATABASE_SSL_CERT
- using \n
string for line breaksDATABASE_URL
SUPABASE_PROJECT_API_KEY
- used for Supabase client (interface with Storage)SUPABASE_PROJECT_URL
- also used for Supabase client (interface with Storage)GOOGLE_CLIENT_ID
PHX_HOST
- e.g. lanttern.org
SECRET_KEY_BASE
- Phoenix generated