Avatar

my-app-s(M.R.E)

GitHub repository:

portainer-stack

Stack

📦 Portainer Stack

Flexible infrastructure template for deploying Portainer CE with support for direct access or integration with a Traefik reverse proxy.

This configuration allows you to deploy Portainer CE in two flexible modes:

  1. Direct Access (default): Runs out-of-the-box on a specified port without extra dependencies.
  2. Traefik Proxy Mode (via profiles): Automatically routes traffic and manages SSL certificates (Let’s Encrypt / Self-Signed) through an external Traefik edge gateway.

🚀 Quick Start

  1. Clone the repository and copy the example environment file:
cp .env.example .env

  1. Adjust the variables in .env if needed.
  2. Choose your deployment mode:

Mode A: Direct Access (Default)

Starts Portainer directly on the configured port (default: 9000):

docker compose up -d

Access via: http://<server-ip>:9000

Mode B: With Traefik Reverse Proxy

Starts Portainer integrated with your external Traefik network:

docker compose --profile traefik up -d

Access via your configured domain over HTTPS.


⚙️ Configuration (.env)

Variable Description Default
VERSION_P Portainer CE image version latest
PORT_HTTP Host port for direct access mode 9000
PROJECT_NAME Traefik external network prefix (<PROJECT_NAME>_public_network) traefik
DOMAIN Domain name for Traefik routing empty
CERT_RESOLVER Traefik ACME certificate resolver name empty

📖 Documentation


🔧 SSL Certificate Maintenance (Traefik Mode)

To reset Let’s Encrypt certificates and trigger a renewal:

docker compose --profile traefik down
docker volume rm traefik_certificates
docker compose --profile traefik up -d


🏷️ Trademarks

This project is an independent work and is not affiliated with or endorsed by Docker, Portainer, or Traefik.

All product names, logos, and brands are the property of their respective owners.


Disclaimer & License

Author & Contacts