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

Gitpodified RC4Conferences 🍊 #75

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

Palanikannan1437
Copy link

Issue in brief

Create an optimised Gitpod script for the project so that contributors can enjoy super fast speeds to setup and work on developing and contributing to the codebase⚡️!

Suggested Fixes/Changes

  • Added init tasks in .gitpod.yml and separated tasks so that pre-builds can be run efficiently
  • Tasks that run during initialisation (init) for caching via pre-builds
    • Install Backend Containers: Pulls necessary image from docker hub so that the results can be cached until next commit(pre-builds)
    • Init Next.js App: Install all npm packages for the Next.js app in the app directory
    • Init Strapi App: Install all npm packages for the Strapi app in the cms directory and build for production
  • Tasks that run during runtime(command)
    • Start Backend: Starts up the entire backend
    • Init Strapi App: Starts the Stapi service
    • Start build: Starts the Next.js app once the Strapi app starts
  • init tasks are performed asynchronously for max optimization and then the command tasks are awaited based on the init tasks
  • Extracted the initialisation logic from the main build script into multiple scripts into gitpod-scripts for faster async loading!
  • Added Dependencies_Check to check npm and node versions before starting to execute any code...
  • Added default DOMAIN support incase localhost/ip isn't provided while executing the command
DOMAIN="localhost"
if [ ! -z "$1" ]; then DOMAIN="$1"; fi
  • Changed rc4community to rc4conferences wherever needed
  • Added logic to increase waittime until the backend containers starts up till a minute!
  • Added tons of parallel code execution to support faster setup speeds without the developer having to worry about order of execution of script...IT JUST WORKS
  • Extracted and modified necessary existing scripts into gitpod-scripts
  • Fixed the bug of Next.js app starting before the Strapi service by awaiting for the Strapi port to start listening!
  • Updated Readme for instructions on how to use pre-builds in Gitpod for their forked version! (WIP)

Demo

The magical dev-workflow with pre-builds on Gitpod enabled from a new contributor perspective (WIP)

@Palanikannan1437 Palanikannan1437 marked this pull request as ready for review January 22, 2023 19:40
@Dnouv
Copy link
Member

Dnouv commented Jan 24, 2023

Hey @Palanikannan1437

Thanks for the PR. All things work perfectly. Just one error when the request to fauna Superprofile is made:

An error occurred while getting user details on Superprofile ApolloError: Must provide schema definition with query type or a type named Query.

Please have a look into this. Thank you!

Some additional details to debug:
The error is caused due to no data & schema being initialized in Fauna, and this is done in superprofile/log/initialize.sh
the command which does this starts from this line

fauna upload-graphql-schema /var/log/faunadb/schema.gql --domain="$1" --port="8443" --scheme="http"  --secret=`cat dbkey` --graphqlHost=$1 --graphqlPort=8084 --mode=replace

@Dnouv
Copy link
Member

Dnouv commented Feb 10, 2023

@Palanikannan1437, any updates on this PR?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NEW] Gitpodify RC4Conferences
2 participants