Skip to content

chore(backend): simplify & unify self hosting #918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 74 commits into from
Aug 5, 2024
Merged

chore(backend): simplify & unify self hosting #918

merged 74 commits into from
Aug 5, 2024

Conversation

detj
Copy link
Contributor

@detj detj commented Jul 15, 2024

Summary

Simplify self hosting process using docker, unify all environment variables and migrations. Ready the project towards deployment.

Tasks

  • Update web app environment variables to be docker compatible
  • Dockerize web app
  • Simplify database migrations
  • Simplify local development start up
  • Publish docker images to ghcr.io
  • Remove third-party dependency on ipinfo
  • Author install.sh script
  • Simplify configuration management
  • Deploy on cloud provider
  • 📚 Write fresh self hosting guide
  • 📚 Update contribution guide

fixes #842

- change web app environment variables
- use 2 separate environment variables for api base url

fixes #842
@detj detj self-assigned this Jul 15, 2024
Copy link

vercel bot commented Jul 15, 2024

@detj is attempting to deploy a commit to the measure Team on Vercel.

To accomplish this, @detj needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account.

detj added 27 commits July 16, 2024 03:43
- update api base url environment variable

fixes #842
- fix an issue with authentication occurring with productionized docker
container(s).
- improve authn error handling

fixes #842
- add `.dockerignore` for web app

fixes #842
- change next config settings to produce a standalone artifact on build

fixes #842
- add `dockerfile`
- add `dockerfile.prod` for production builds

fixes #842
- modify root docker compose.yml to define web as a first-party service
- modify root docker compose.prod.yml to define web as a first-party
service

fixes #842
- run migrations within a `migrate` docker compose profile

fixes #842
- remove `.env.example` for measure-go
- remove `.env.example` for web app

fixes #842
- rename symbolicator-retrace dockerfile
- add oci images label to measure-go dockerfile
- add oci images label to symbolicator-retrace dockerfile
- add oci images label to measure-web-app dockerfile

#842
- reorganize measure-go dockerfile
- reorgnize symbolicator-retrace dockerfile
- reorgnize measure-web-app dockerfile
- add build and push to github container regsitry job
- fix the invalid glob paths for the `on` directive
- whitelist path to measure-go.yml workflow file
- add `IMAGE_REF` ARG in measure-go's dockerfile
- add `IMAGE_REF` build arg
- mod label syntax
- wrap a label's value in double quotes
- trigger on dockerfile change
detj added 25 commits August 1, 2024 15:53
- add clickhouse healthcheck
- normalize postgres and clickhouse healthcheck settings
- update `self-host/.env.example` file to reflect latest updates
- change exposed port number of minio from `9111` to `9119` to avoid
port conflicts
- improve clickhouse healthcheck mechanism
- update `self-host/config.sh` script to reflect updated attachment
bucket origin url
- increase reliability of dbmate migrations
- run docker in debug mode when script's debug mode is on
- add couple of info logs
- improve the order of execution of high level tasks
- wrote code comments for all functions
- reorganize function order
- add code comments
- made database password to be generated automatically by default
- avoid logging sensitive passwords when configuring
- automate storage bucket settings by defualt for production
- change mechanism to generate secure passwords
- add check for existence of openssl in installation environment
- update config creation to also generate config files for web app
- fix issues with clickhouse configuration
- improve config script further
- measure api server needs web app site origin value for configuring
cors settings
- server won't start unless `SITE_ORIGIN` environment variable is
present at start time
- set `API_BASE_URL` for web service
- log status code returning from github primary email fetch
- remove hardcoded github redirect uri
- remove unneccessary environment variable from web .env.local file
- add extra space to preserve output of insignia
- add self hosting guide
- add guide to create google oauth app
- add guide to create github oauth app
- run `npm install` when developing
- organize contribution guide
- add fresh info about setting up environment using docker compose for
first time development
- add troubleshooting section
@detj detj requested a review from anupcowkur August 5, 2024 05:41
@detj detj merged commit 129a54a into main Aug 5, 2024
12 checks passed
@detj detj deleted the dockerize-web-app branch August 5, 2024 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Simplify self host deployment
2 participants