docker

Design and deploy Docker multi-service stacks with Nginx and Supervisor.

Updated Oct 28, 2025
One-click install
npx skills add https://github.com/kaxuna1/ecomsite --skill docker-kaxuna1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker
Source: https://github.com/kaxuna1/ecomsite/tree/main/.claude/skills/docker
Command: npx skills add https://github.com/kaxuna1/ecomsite --skill docker-kaxuna1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides engineers to design, build, and deploy a robust Docker-based multi-service stack that consolidates PostgreSQL, Node.js backend, Nginx reverse proxy, and Supervisor process management for production readiness.

Core Features & Use Cases

  • Multi-stage build patterns to minimize image size and separate build-time dependencies.
  • Supervisor-driven startup order to ensure database readiness before migrations and backend startup.
  • Nginx reverse proxy configuration for API routing and static content delivery, with health checks integrated.
  • Health check setup and monitoring guidelines to maintain reliable deployments.
  • Deployment strategies and rollback patterns (blue/green, versioned tags) for production environments.

Quick Start

Start the stack with docker-compose up -d in the repository root (if a docker-compose.yml is provided). Alternatively, build and run the images manually:

  • Build: docker build -t luxia-ecommerce:latest .
  • Run: docker run -d --name luxia-app -p 80:80
    -e JWT_SECRET=your-secret -e DB_PASSWORD=your-db-password -e POSTGRES_PASSWORD=your-db-password
    -v luxia-postgres:/var/lib/postgresql/data -v luxia-uploads:/app/backend/uploads luxia-ecommerce:latest
  • Or use separate services with docker-compose for frontend, backend, and nginx.

Frequently Asked Questions about docker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Nginx reverse proxy and Supervisor for a Docker multi-service stack?

You configure a Docker multi-service stack by using Supervisor to manage startup sequencing for database readiness and Nginx as a reverse proxy for API routing and static content delivery. This ensures backend migrations run only after PostgreSQL is fully initialized.

What are the deployment and rollback patterns for a Dockerized production environment?

Deployment and rollback patterns for a Dockerized production environment utilize blue/green deployments and versioned image tags. This approach aligns with CI/CD workflows to maintain reliable updates and quick recovery across staging and production environments.

How do multi-stage builds minimize Docker image size for Node.js backend applications?

Multi-stage builds minimize Docker image size by separating build-time dependencies from the final runtime environment. This pattern compiles Node.js backend assets in an intermediate container, leaving only production-ready files in the deployed image.

Can I use docker-compose to manage persistent volumes for PostgreSQL and application uploads?

Yes, you can use docker-compose to manage persistent volumes for PostgreSQL data and application uploads. Mapping volumes like luxia-postgres and luxia-uploads ensures data survives container restarts during local, staging, and production deployments.

Why do I need health checks in an Nginx and Docker container deployment?

Health checks are needed in Docker deployments to monitor service availability and maintain reliable routing through Nginx. They verify that backend APIs and databases are responsive before traffic is routed, preventing downtime during startup.

Does this Docker deployment pattern work for local development and production environments?

Yes, this Docker deployment pattern works across local, staging, and production environments. It uses docker-compose for multi-service orchestration, explicit environment variables for secrets, and consistent build patterns for CI/CD alignment.