Skip to content

thaidmfinnick/fin_deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FinDeploy

Roadmap

  1. setup postgresql + citus + db test
docker run -d --name findeploydb -p 5432:5432 -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin -e POSTGRES_DB=findeploychat citusdata/citus:12.1
  • check config db in config.exs, repo.ex
  • create db with mix ecto.create
  • create citus MyApp.Repo.Citus inside repo.ex
  • execute sql
CREATE EXTENSION citus;
SELECT * from master_add_node('fin-worker-1', 5432);
SELECT * from master_add_node('fin-worker-2', 5432);
SELECT * FROM master_get_active_worker_nodes();
  • write migrations files for repo and repo.citus
  • check if mix ecto.migrate run successfully at local
  1. setup linux server to test citus
  • setup postgresql on server
  • download and setup citus follow docs
  1. setup edeliver + distillery + deploy on host and test with ecto repositories
  • setup prod.exs same as dev.exs
  • setup edeliver in .deliver/config with prod.exs
  • mix distillery.init
  • test local with mix distillery.release, if error, fix
  • run on server with mix edeliver build release --branch=main
  1. config if multi repo
  • config in edeliver fork repo
  1. step to build with edeliver
  • note:
    • build release and deploy (need restart) => mix edeliver build release --branch=main && mix edeliver deploy release to production
  • build release and upgrade later

About

Learning Elixir deploy and database management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published