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

update docker push action #2771

Merged
merged 3 commits into from
Feb 20, 2025
Merged

update docker push action #2771

merged 3 commits into from
Feb 20, 2025

Conversation

imolorhe
Copy link
Collaborator

@imolorhe imolorhe commented Feb 20, 2025

Fixes

Checks

  • Ran yarn test-build
  • Updated relevant documentations
  • Updated matching config options in altair-static

Changes proposed in this pull request:

Summary by Sourcery

This pull request updates the Docker build and push process, adds a new workflow for pushing Docker images on releases, and provides documentation for self-hosting Altair GraphQL Cloud.

New Features:

  • Adds a new workflow to push Docker images to Docker Hub, triggered on releases.

Enhancements:

  • Configures Docker to use the containerd snapshotter feature for improved performance and stability.
  • Adds support for building Docker images for multiple platforms (linux/amd64, linux/arm64).

Build:

  • Updates the Docker build process to support multiple platforms and enable containerd snapshotter.

CI:

  • Integrates Docker image pushing into the release workflow.

Documentation:

  • Adds documentation for self-hosting Altair GraphQL Cloud using Docker, DigitalOcean, Vercel, and Render.

Copy link

sourcery-ai bot commented Feb 20, 2025

Reviewer's Guide by Sourcery

This pull request updates the Docker push action to support multiple platforms and integrates it into the release workflow. It also adds documentation for self-hosting Altair GraphQL Cloud.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Configures Docker Buildx with containerd-snapshotter feature and enables debug mode.
  • Adds a step to set up Docker with a daemon configuration.
  • Enables the containerd-snapshotter feature in the Docker daemon configuration.
  • Enables debug mode in the Docker daemon configuration.
.github/workflows/_push-docker.yml
Adds support for multiple platforms (linux/amd64, linux/arm64) when building and pushing Docker images.
  • Adds the platforms option to the docker/build-push-action to specify target platforms.
  • Sets the platforms to linux/amd64,linux/arm64.
.github/workflows/_push-docker.yml
Integrates the Docker push workflow into the release workflow.
  • Adds a new job docker to the release.yml workflow.
  • Uses the _push-docker.yml reusable workflow to push Docker images.
  • Passes the push input as true to enable pushing.
  • Passes the release tag as the version input to the Docker push workflow.
  • Inherits secrets for the Docker push workflow.
.github/workflows/release.yml
Adds documentation for self-hosting Altair GraphQL Cloud using Docker, DigitalOcean, Vercel, and Render.
  • Creates a new markdown file packages/altair-docs/docs/cloud/self-hosting.md.
  • Provides instructions for self-hosting using a pre-built Docker image.
  • Provides instructions for building the Docker image from source.
  • Adds links for deploying to DigitalOcean, Vercel, and Render.
packages/altair-docs/docs/cloud/self-hosting.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @imolorhe - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a comment explaining why the Docker daemon config needs to be updated.
  • The new documentation file looks good, but consider adding a section on how to update the application.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +32 to +41
2. Building the Docker image from the source code

#### Using the pre-built Docker image

To install Altair GraphQL Cloud on your server using the pre-built Docker image, follow these steps:

1. Create a new directory on your server and navigate to it:

```bash
mkdir altair-graphql-cloud
Copy link

Choose a reason for hiding this comment

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

suggestion: Please provide more detailed instructions for building from source.

The current instructions are too vague. Please add the specific commands needed to build and run the Docker image, including navigating to the correct directory, building the image with the Dockerfile, and running the container with necessary environment variables. You can refer the user to the docker-compose.yml example for the required environment variables.

Suggested implementation:

#### Using the pre-built Docker image

To install Altair GraphQL Cloud on your server using the pre-built Docker image, follow these steps:

1. Create a new directory on your server and navigate to it:

   ```bash
   mkdir altair-graphql-cloud
   cd altair-graphql-cloud

Building the Docker image from the source code

To build the Docker image from the source code, follow these steps:

  1. Clone the Altair GraphQL Cloud repository (if you haven't already):

    git clone https://github.com/YourOrganization/altair-graphql-cloud.git
    cd altair-graphql-cloud
  2. Navigate to the directory containing the Dockerfile. If the Dockerfile is in a subdirectory, change to that directory:

    cd path/to/dockerfile-directory   # change this to the actual directory if needed
  3. Build the Docker image with the provided Dockerfile:

    docker build -t altair-graphql-cloud .
  4. Run the container with the necessary environment variables. Refer to the docker-compose.yml for a list of required environment variables:

    docker run -d -p 80:80 -p 443:443 \
      -e ENV_VAR1=value1 \
      -e ENV_VAR2=value2 \
      altair-graphql-cloud

Make sure to update the repository URL and the path to the Dockerfile directory if they differ in your setup. Also, adjust the environment variable placeholders and port mappings as needed based on your actual configuration.

Copy link

github-actions bot commented Feb 20, 2025

Visit the preview URL for this PR (updated for commit 9fb3a0c):

https://altair-gql--pr2771-imolorhe-update-dock-o1sz8pka.web.app

(expires Thu, 27 Feb 2025 22:27:33 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 02d6323d75a99e532a38922862e269d63351a6cf

@imolorhe imolorhe added this pull request to the merge queue Feb 20, 2025
@imolorhe imolorhe removed this pull request from the merge queue due to a manual request Feb 20, 2025
@imolorhe imolorhe added this pull request to the merge queue Feb 20, 2025
Merged via the queue into master with commit 4db117d Feb 20, 2025
14 checks passed
@imolorhe imolorhe deleted the imolorhe/update-docker-builds branch February 20, 2025 22:24
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.

1 participant