feat(blueprints): add Hoppscotch AIO blueprint with migrations (#449)

Added Docker Compose setup, configuration template, logo, and metadata for Hoppscotch Community Edition. Includes PostgreSQL, database migrations, and subpath routing for self-hosted API testing tool deployment.
This commit is contained in:
Jainil Prajapati
2025-10-15 09:05:28 +05:30
committed by GitHub
parent 36af3499f9
commit 25b94d1e85
4 changed files with 134 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
version: "3.8"
services:
hoppscotch:
image: hoppscotch/hoppscotch:latest
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
expose:
- 80
environment:
# Database
DATABASE_URL: "${DATABASE_URL}"
DATA_ENCRYPTION_KEY: "${DATA_ENCRYPTION_KEY}"
HOPP_AIO_ALTERNATE_PORT: "${HOPP_AIO_ALTERNATE_PORT}"
WHITELISTED_ORIGINS: "${WHITELISTED_ORIGINS}"
# Frontend config
VITE_BASE_URL: "${VITE_BASE_URL}"
VITE_SHORTCODE_BASE_URL: "${VITE_SHORTCODE_BASE_URL}"
VITE_ADMIN_URL: "${VITE_ADMIN_URL}"
# Backend config
VITE_BACKEND_GQL_URL: "${VITE_BACKEND_GQL_URL}"
VITE_BACKEND_WS_URL: "${VITE_BACKEND_WS_URL}"
VITE_BACKEND_API_URL: "${VITE_BACKEND_API_URL}"
# Optional UI links
VITE_APP_TOS_LINK: "${VITE_APP_TOS_LINK}"
VITE_APP_PRIVACY_POLICY_LINK: "${VITE_APP_PRIVACY_POLICY_LINK}"
# Subpath access
ENABLE_SUBPATH_BASED_ACCESS: "true"
volumes:
- hoppscotch-data:/app/data
postgres:
image: postgres:16
restart: unless-stopped
expose:
- 5432
environment:
POSTGRES_DB: "${POSTGRES_DB}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
volumes:
- hoppscotch-postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
migrate:
image: hoppscotch/hoppscotch:latest
depends_on:
postgres:
condition: service_healthy
entrypoint: ["/bin/sh", "-c"]
command:
- |
echo "Running database migrations..."
pnpm dlx prisma migrate deploy && echo "Migration complete!"
environment:
DATABASE_URL: "${DATABASE_URL}"
restart: "no"
volumes:
hoppscotch-data:
hoppscotch-postgres:

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

View File

@@ -0,0 +1,41 @@
[variables]
main_domain = "${domain}"
db_password = "${password:32}"
encryption_key = "${password:32}"
[config]
[[config.domains]]
serviceName = "hoppscotch"
port = 80
host = "${main_domain}"
path = "/"
[config.env]
# Database & Encryption
POSTGRES_DB = "hoppscotch"
POSTGRES_USER = "hoppscotch"
POSTGRES_PASSWORD = "${db_password}"
DATABASE_URL = "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}"
DATA_ENCRYPTION_KEY = "${encryption_key}"
# AIO Port
HOPP_AIO_ALTERNATE_PORT = "80"
# Whitelist / Routing
WHITELISTED_ORIGINS = "https://${main_domain},http://${main_domain},app://hoppscotch"
VITE_BASE_URL = "https://${main_domain}"
VITE_SHORTCODE_BASE_URL = "https://${main_domain}"
VITE_ADMIN_URL = "https://${main_domain}/admin"
VITE_BACKEND_GQL_URL = "https://${main_domain}/backend/graphql"
VITE_BACKEND_WS_URL = "wss://${main_domain}/backend/graphql"
VITE_BACKEND_API_URL = "https://${main_domain}/backend/v1"
# Legal Links
VITE_APP_TOS_LINK = "https://docs.hoppscotch.io/support/terms"
VITE_APP_PRIVACY_POLICY_LINK = "https://docs.hoppscotch.io/support/privacy"
# Subpath Access
ENABLE_SUBPATH_BASED_ACCESS = "true"
[[config.mounts]]

View File

@@ -2676,6 +2676,25 @@
"server"
]
},
{
"id": "hoppscotch",
"name": "Hoppscotch (AIO + Migrations)",
"version": "latest",
"description": "Hoppscotch Community Edition (All-in-One) with automatic database migrations. Includes backend, frontend, and admin under unified subpath routing.",
"logo": "image.png",
"tags": [
"api",
"testing",
"development",
"postman-alternative",
"graphql"
],
"links": {
"website": "https://hoppscotch.io/",
"github": "https://github.com/hoppscotch/hoppscotch",
"docs": "https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build"
}
},
{
"id": "hortusfox",
"name": "HortusFox",