[PR #3296] feat: smaller container images #4335

Open
opened 2026-03-17 01:52:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3296
Author: @AndrewBastin
Created: 8/27/2023
Status: 🔄 Open

Base: release/2023.12.3Head: experiment/backend-deploy


📝 Commits (3)

  • 2c13f31 feat: update docker setup to have smaller container sizes
  • 6131825 refactor: reintroduce pnpm into the docker containers
  • f8e3fbb chore: reintroduce alpine 3.19 for backend images

📊 Changes

2 files changed (+22 additions, -8 deletions)

View changed files

📝 packages/hoppscotch-backend/package.json (+5 -0)
📝 prod.Dockerfile (+17 -8)

📄 Description

This PR intends to reduce the size of the container images (mostly the backend container and because of that, the new AIO container). In my builds locally, the container image sizes have around 90% size reduction.

Description

This PR uses the pnpm deploy command to isolate the backend build into a full independent package which place in a separate fresh build stage to run.

A big thing to note here is to reduce size, the new backend container (and hence the AIO container) does not have pnpm, so you will need to use npm and npx for any package relating stuff (for example, DB migration runs).
[pnpm is now available.]

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/3296 **Author:** [@AndrewBastin](https://github.com/AndrewBastin) **Created:** 8/27/2023 **Status:** 🔄 Open **Base:** `release/2023.12.3` ← **Head:** `experiment/backend-deploy` --- ### 📝 Commits (3) - [`2c13f31`](https://github.com/hoppscotch/hoppscotch/commit/2c13f316cebbefd7eefbb818113a51742a77011f) feat: update docker setup to have smaller container sizes - [`6131825`](https://github.com/hoppscotch/hoppscotch/commit/61318257a5bc47cd45ce22243a367edaadb57832) refactor: reintroduce pnpm into the docker containers - [`f8e3fbb`](https://github.com/hoppscotch/hoppscotch/commit/f8e3fbba550024145fba036412b525df92216f95) chore: reintroduce alpine 3.19 for backend images ### 📊 Changes **2 files changed** (+22 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-backend/package.json` (+5 -0) 📝 `prod.Dockerfile` (+17 -8) </details> ### 📄 Description This PR intends to reduce the size of the container images (mostly the backend container and because of that, the new AIO container). In my builds locally, the container image sizes have around 90% size reduction. ### Description This PR uses the [`pnpm deploy`](https://pnpm.io/cli/deploy) command to isolate the backend build into a full independent package which place in a separate fresh build stage to run. ~~A big thing to note here is to reduce size, the new backend container (and hence the AIO container) does not have pnpm, so you will need to use `npm` and `npx` for any package relating stuff (for example, DB migration runs).~~ [`pnpm` is now available.] ### Checks - [x] My pull request adheres to the code style of this project - [x] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4335
No description provided.