Sign inSign up

sofyansolutions/kasapro-nginx

By sofyansolutions

•Updated 10 months ago

Web Server to Service Kasapro

Image
0

162

sofyansolutions/kasapro-nginx repository overview

⁠Kasapro Nginx Reverse Proxy

Kasapro Nginx is a reverse proxy with automatic SSL certificate generation for the Kasapro POS system. Part of the Kasapro POS suite designed for UMKM (small and medium enterprises) in Indonesia.

⁠Quick Start

# Pull the image
docker pull sofyansolutions/kasapro-nginx:latest

# Or use specific version
docker pull sofyansolutions/kasapro-nginx:v1.0.0

⁠Usage

This image is designed to be used as part of the complete Kasapro stack. It provides:

  • Reverse proxy for backend and frontend services
  • Automatic SSL certificate generation (self-signed)
  • HTTPS redirect from HTTP
  • Health check endpoint
services:
  nginx:
    image: sofyansolutions/kasapro-nginx:${ERP_VERSION:-latest}
    ports:
      - "9444:80"   # HTTP (redirects to HTTPS)
      - "9443:443"  # HTTPS
    volumes:
      - nginx_ssl_data:/etc/nginx/ssl
    depends_on:
      - frontend
      - backend

See the complete installation guide⁠ for full docker-compose setup.

⁠SSL Certificates

⁠Automatic Certificate Generation

SSL certificates are automatically generated on first start:

  • Self-signed certificates for development/testing
  • Certificates stored in Docker volume (nginx_ssl_data)
  • Certificates persist across container restarts
⁠Trusting the Certificate

To trust the self-signed certificate:

  1. Access https://localhost:9443/ca.crt to download CA certificate
  2. Install ca.crt in your browser/OS trusted certificate store
  3. Restart browser after installing certificate
⁠Using Your Own Certificates

To use your own SSL certificates:

  1. Mount your certificate files to /etc/nginx/ssl/:

    volumes:
      - ./ssl/cert.pem:/etc/nginx/ssl/cert.pem
      - ./ssl/key.pem:/etc/nginx/ssl/key.pem
    
  2. The container will detect existing certificates and use them

⁠Configuration

⁠Ports
  • 80 - HTTP port (redirects to HTTPS)
  • 443 - HTTPS port (main access point)
⁠Default Port Mapping
  • HTTP: 9444:80 (external:internal)
  • HTTPS: 9443:443 (external:internal)

Change via environment variables:

  • NGINX_HTTP_PORT - External HTTP port (default: 9444)
  • NGINX_PORT - External HTTPS port (default: 9443)
⁠Volumes
  • nginx_ssl_data - SSL certificates storage (required)
    • Automatically created if not specified
    • Persists certificates across restarts

⁠Features

  • Automatic SSL - Self-signed certificates generated automatically
  • HTTPS Redirect - HTTP automatically redirects to HTTPS
  • Reverse Proxy - Routes requests to backend and frontend
  • Health Checks - Built-in health check endpoint at /healthz
  • Production Ready - Optimized Nginx configuration

⁠Health Check

The nginx container includes a health check endpoint:

curl http://localhost/healthz

⁠Routing

  • /api/* - Routes to backend service
  • / - Routes to frontend service
  • /healthz - Health check endpoint

⁠Ports

  • 80 - HTTP (internal, redirects to HTTPS)
  • 443 - HTTPS (internal, main access)

⁠Dependencies

  • Backend service (required)
  • Frontend service (required)

⁠Tags

  • latest - Latest stable release
  • v1.0.0, v1.1.0, etc. - Versioned releases
  • sha-abc123 - Development builds (commit SHA)

⁠Troubleshooting

⁠Certificate Issues

If you see certificate warnings:

  1. Download CA certificate from https://localhost:9443/ca.crt
  2. Install in your browser/OS certificate store
  3. Restart browser
⁠Port Conflicts

If ports 9443 or 9444 are in use:

# Set custom ports
export NGINX_PORT=8443
export NGINX_HTTP_PORT=8444
docker compose -f docker-compose.selfhosted.yml up -d
⁠400 Bad Request

Always use https:// protocol, not http://:

  • ✅ Correct: https://localhost:9443
  • ❌ Wrong: http://localhost:9443

⁠Full Documentation

For complete installation guide, SSL setup, and troubleshooting:

  • GitHub Repository: On Progress
  • Documentation: On Development
  • Quick Start Guide: See sofyansolutions/kasapro repository
  • sofyansolutions/kasapro-backend - Backend API service
  • sofyansolutions/kasapro-frontend - Frontend web application

⁠Support

⁠License

See the main Kasapro repository for license information.


Made with ❤️ for UMKM Indonesia

Kasapro - Kasa Professional untuk Toko Anda

Tag summary

Content type

Image

Digest

sha256:6233a1021…

Size

47.3 MB

Last updated

10 months ago

docker pull sofyansolutions/kasapro-nginx:v1.0.0