Skip to content
/ lisbon Public

An app to showcase full start to end production-ready deployment of Phoenix app.

Notifications You must be signed in to change notification settings

dimamik/lisbon

Repository files navigation

Lisbon

An app to showcase full start to end production-ready deployment of the phoenix app. The app itself can be anything that needs a database, ecto schema and some business logic. The core purpose for this project is to learn (and share) how to deploy the app without any 3rd party tooling (like fly.io).

The costs of this deploy are:

  • Domain cost: ~10$/anually - cloudflare
  • VPS cost: starting from 5$/monthly - hetzner

Links

Docs

State

First stage (single server instance)

  • Orchestrated docker-compose file with database, phoenix app
  • Circle CI config that will build and run tests
  • Circle CI config that will deploy the app using releases and docker
  • A livebook showcase on how to debug some of the production-issues without ssh

Second stage (multiple instances)

  • Introduce metrix to measure app load & system events
  • Introduce second VPS and add load-balancing (via shared network)
  • Replicate the database, use postgres streams to create a follower
  • Introduce CloudFlare and accept only proxied requests from there

Third stage (authentication use-case)

By this stage, we need to have fault-tolerant app that auto-depoloys on-commit, has a reliable postgres connection pulls

  • Authentication via different providers:
    • Email
    • Google Auth
    • SSO
    • 2FA