Supanote Core Team
@supanote Verified CreatorOfficial open-source templates, infrastructure manifests, and verified developer snippets curated by the Supanote team.
Public Snippets & Templates
61–70 of 70 publishedMulti-Stage Production Node.js Dockerfile with Distroless
Stage 1: Dependency resolution and compilation FROM node:20-alpine AS deps WORKDIR /app COPY package*.json ./ RUN --mount=type=cache,target=/root/.npm \ npm ci --omit=dev --ignore-scripts Stage 2: Application builder (if...
# Stage 1: Dependency resolution and compilation
FROM node:20-alpine AS deps
WORKDIR /app
COPY package*.json ./
RUN --mount=type=cache,target=/root/.npm \
npm ci --omit=dev --ignore-scripts
#...
Systemd Production Service Unit for Node.js Application
[Unit] Description=Node.js Production Application Service After=network.target postgresql.service Wants=postgresql.service [Service] Type=simple User=deploy Group=deploy WorkingDirectory=/var/www/app ExecStart=/usr/bin/n...
[Unit]
Description=Node.js Production Application Service
After=network.target...
Docker Compose Next.js Stack with Caddy Auto-SSL
version: '3.8' services: caddy: image: caddy:2-alpine restart: unless-stopped ports: - "80:80" - "443:443" volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro - caddy_data:/data - caddy_config:/config depends_on: - web networ...
version: '3.8'
services:
caddy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
-...
Nginx SPA Single-Page App Fallback & Caching Routing
Nginx Single Page Application (SPA) Routing & Caching server { listen 80; listen [::]:80; server_name app.example.com; root /var/www/app/dist; index index.html; # Gzip & Brotli Compression gzip on; gzip_types text/plain...
# Nginx Single Page Application (SPA) Routing & Caching
server {
listen 80;
listen [::]:80;
server_name app.example.com;
root /var/www/app/dist;
index index.html;
# Gzip &...
Nginx WebSocket Reverse Proxy Configuration
Nginx Reverse Proxy with Full WebSocket Support map $httpupgrade $connectionupgrade { default upgrade; '' close; } upstream websocket_backend { server 127.0.0.1:4000; keepalive 64; } server { listen 443 ssl http2; server...
# Nginx Reverse Proxy with Full WebSocket Support
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream websocket_backend {
server 127.0.0.1:4000;
...
GitHub Actions Node.js CI/CD Matrix Pipeline
name: CI/CD Pipeline on: push: branches: [main] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest strategy: matrix: node-version: [18.x, 20.x, 22.x] steps: - name: Checkout Code uses: actions/checkout@v4...
name: CI/CD Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x,...
Modern HTML5 Responsive Boilerplate
Modern Web Application :root { color-scheme: light dark; --bg: #ffffff; --text: #09090b; } @media (prefers-color-scheme: dark) { :root { --bg: #09090b; --text: #f4f4f5; } } body { margin: 0; font-family: system-ui, -appl...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modern Web Application</title>
<meta...
High-Performance SQLite Production PRAGMAs
-- High-Performance Concurrent SQLite Configuration -- Run immediately after opening database connection -- 1. Enable Write-Ahead Logging (concurrent readers + writer) PRAGMA journal_mode = WAL; -- 2. Synchronous NORMAL...
-- High-Performance Concurrent SQLite Configuration
-- Run immediately after opening database connection
-- 1. Enable Write-Ahead Logging (concurrent readers + writer)
PRAGMA journal_mode = WAL;
--...
Docker Compose Production Web Stack
version: '3.8' services: web: build: . restart: always environment: NODE_ENV: production DATABASEURL: ${DATABASEURL} REDISURL: ${REDISURL} ports: - "3000:3000" depends_on: - db - redis networks: - internal db: image: pos...
version: '3.8'
services:
web:
build: .
restart: always
environment:
NODE_ENV: production
DATABASE_URL: ${DATABASE_URL}
REDIS_URL: ${REDIS_URL}
ports:
-...
Nginx Reverse Proxy with SSL & Security Headers
Production Nginx Reverse Proxy Configuration server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name api.example.com; # SSL Certificates & Modern Ciphers ssl_certificate /etc/letsencrypt/live/example.com/fu...
# Production Nginx Reverse Proxy Configuration
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name api.example.com;
# SSL Certificates & Modern Ciphers
...