NginxProxyManager / NginxProxyManager/nginx-proxy-manager

NPM on a Swarm Cluster does not work well with more than one replica

Open
#4,387 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug stale
Dominant language
TypeScript
Stars
34.2k
Forks
3.9k
Avg merge
21h 12m
Merged PRs (30d)
20

Description

I'm trying to deploy NPM on a Docker Swarm Cluster. Everything works fine until I add more than one replica to the service.
The last test I did was using a remote MySQL and the /data files on an NFS. I set up a service with 3 replicas and there was no way to get it to be consistent.
My question is: is it possible to deploy an NPM service on a Docker Swarm cluster with more than one replica?
Does anyone have it in production?

This is my latest Stack:

version: '3.8'

services:
nginx-proxy-manager:
image: jc21/nginx-proxy-manager:latest
ports:

  • "80:80" # HTTP port
  • "81:81" # Management interface port
  • "443:443" # HTTPS port
    environment:
    DB_MYSQL_HOST: "ip"
    DB_MYSQL_PORT: "3306"
    DB_MYSQL_USER: "user"
    DB_MYSQL_PASSWORD: "pass"
    DB_MYSQL_NAME: "dbname"
    volumes:
  • /mnt/nfs/app:/data
  • /mnt/nfs/letsencrypt:/etc/letsencrypt
    networks:
  • dts-full-service-network
    deploy:
    replicas: 1
    placement:
    constraints:
  • "node.role==worker"

networks:
dts-full-service-network:
external: true

ONLY IF YOU HAVE A REPLICA IT WORKS WELL.
/mnt/nfs/ is an NFS

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Docker Swarm stack shown in the issue and reproduce the behavior with three replicas, remote MySQL, and NFS-backed /data and /etc/letsencrypt volumes. Determine whether multi-replica deployment is supported and document or resolve the consistency problem, with production guidance as the completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, mysql
Domain
databases, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.