Skip to content
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

chore(repo-structure): Docker images and stacks organized and clarified #9530

Merged
merged 13 commits into from
Mar 19, 2024

Conversation

rafaelromcar-parabol
Copy link
Contributor

@rafaelromcar-parabol rafaelromcar-parabol commented Mar 12, 2024

Description

Deletes all deployment related files that are not used and simplifies that management of all the kept files. This makes it easier to understand how the application can be deployed in different environments and also simplifies how we maintain our repository.

Cleaner things are easier things to maintain.

Important changes

  • build.yml Github Action pointing to https://hub.docker.com/r/pgvector/pgvector/tags?page=1&name=pg15 instead of the unmaintained ankane/pgvector:latest.
  • Unused files are gone.
  • Docker tags latest are replaced with specific versions of the applications.
  • New folder run-it to host the how-to run the application in different use cases. docker-compose files under it are built with the same format, to ease comparing them and keeping them up to date.
    • Single-tenant: moved from docker/parabol-ubi/docker-host-st, but same content.
    • Development: dev.yml is placed in its own folder with (almost) everything it needs and names of the services are equal to the ones on the single-tenant deployment.

Questions

  • Should we use pgvector:pg15 or use our own built Docker image for Postgres as the one in docker/postrgres? We agreed on keeping pgvector:pg15 for now.
  • What about the Postgres README? Adapt it so it only shows what relates to the app and nothing about running Postgres or PGAdmin
  • What about the Postgres file cacerts? the file is empty and it is used on the readCert.ts. Leave it like it is for now.
  • Why keeping two different pm2 files? What's the use case for yarn start right now? that's running it without any Docker. Testing after building? It is uses in test.yml. Do as DevOps like. pm2.config.js is only used in testing and for anyone running the app directly from the repository.
  • Postgres json-schema extension is installed on the Docker container built, but it isn't installed on any other environment. What about it? Still required? Extensions supported by GCP CloudSQL Postgres

Validations

  • Github Action build working.
  • RethinkDB readme.
  • Postgres readme.
  • Application works using in development with yarn && yarn db:start && yarn dev with the default .env.example, following the instructions on the README.md.
  • Application works using yarn && yarn build && yarn predeploy && yarn start with the default .env.example.
  • Application runs using the single-tenant docker-compose deployment

@rafaelromcar-parabol rafaelromcar-parabol added DX Developer Experience devops DevOps-related work labels Mar 12, 2024
@rafaelromcar-parabol rafaelromcar-parabol self-assigned this Mar 12, 2024
@rafaelromcar-parabol
Copy link
Contributor Author

rafaelromcar-parabol commented Mar 13, 2024

Do you think the files pm2.dev.config.js and pm2.config.js should be on the root folder or inside the folder run-it/development? @mattkrick @Dschoordsch

Edit: if pm2.config.js is meant for production use (even if not by us), then why is the Embedder already added to it?

@rafaelromcar-parabol
Copy link
Contributor Author

yarn start is found three times in our repository:

  • On the main README as instructions to deploy the application. Should we remove it from there?
  • On the README of the alternative license for the US Department of Defense, also to indicate how to build for production and start the application.
  • In our test.yml for Github. We can keep it here no problem.

Should we create a new pm2.tests.config.js and have that used for testing and keep pm2.configs.js with only stuff that are 100% production ready?

run-it/development/README.md Outdated Show resolved Hide resolved
run-it/single-tenant-host/README.md Outdated Show resolved Hide resolved
run-it/single-tenant-host/README.md Outdated Show resolved Hide resolved
.env.example Outdated Show resolved Hide resolved
Copy link
Contributor

@Dschoordsch Dschoordsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. No issues in dev while testing locally.

run/development/README.md Outdated Show resolved Hide resolved
run/development/README.md Outdated Show resolved Hide resolved
docker/postgres/Dockerfile Outdated Show resolved Hide resolved
…related to the image building under docker/images as build is ignored as folder to push (used by the app when building it)
@github-actions github-actions bot added size/l and removed size/m labels Mar 19, 2024
@rafaelromcar-parabol rafaelromcar-parabol changed the title chore(repo-structure): Docker uses clarified and simplified chore(repo-structure): Docker images and stacks organized and clarified Mar 19, 2024
@rafaelromcar-parabol rafaelromcar-parabol merged commit 6fca12c into master Mar 19, 2024
6 checks passed
@rafaelromcar-parabol rafaelromcar-parabol deleted the repo-org-refactoring branch March 19, 2024 11:23
@github-actions github-actions bot mentioned this pull request Mar 19, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops DevOps-related work DX Developer Experience size/l
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants