Skip to content

[WIP] Fix duplicate nginx-proxy-manager startup during proxy configuration#178

Merged
vsilent merged 3 commits intomainfrom
codex/fix-duplicate-nginx-proxy-manager-startup
May 7, 2026
Merged

[WIP] Fix duplicate nginx-proxy-manager startup during proxy configuration#178
vsilent merged 3 commits intomainfrom
codex/fix-duplicate-nginx-proxy-manager-startup

Conversation

@Codex
Copy link
Copy Markdown
Contributor

@Codex Codex AI commented May 6, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>configure-proxy can trigger duplicate nginx-proxy-manager startup</issue_title>
<issue_description>## Description
Running stacker agent configure-proxy website --domain mobile.syncopia.io --port 3003 appears to leave the stack in a bad proxy state on the next deployment: two nginx-proxy-manager containers show up, one keeps restarting, and deployment pauses because port 80 is already allocated.

This should be an idempotent proxy configuration change, but it can lead to duplicate proxy startup attempts and broken deployments.

Steps to Reproduce

  1. Deploy a stack that uses proxy.type: nginx-proxy-manager.
  2. Run:
    ./stacker agent configure-proxy website --domain mobile.syncopia.io --port 3003
  3. Trigger the next deployment/reconfigure cycle.
  4. Observe duplicate nginx-proxy-manager containers and/or a paused deployment caused by port 80 is already allocated.

Expected Behavior

Proxy reconfiguration should update the existing nginx-proxy-manager setup in place and keep exactly one proxy container/service definition bound to ports 80/81/443.

Actual Behavior

A second nginx-proxy-manager instance can be started or generated, causing port collisions and leaving deployment paused.

Acceptance Criteria

  • Add a failing regression test that reproduces duplicate proxy-manager startup after configure-proxy followed by deploy.
  • Add a BDD scenario for reconfiguring an existing nginx-proxy-manager-backed domain without creating duplicate proxy containers.
  • Ensure deploy/configure-proxy remains idempotent and only one proxy service/container is produced for the stack.
  • Prevent port 80 allocation conflicts caused by duplicate proxy-manager instances.</issue_description>

Comments on the Issue (you are @codex[agent] in this section)

@Codex Codex AI assigned Codex and vsilent May 6, 2026
@Codex Codex AI linked an issue May 6, 2026 that may be closed by this pull request
4 tasks
Co-authored-by: vsilent <42473+vsilent@users.noreply.github.com>
@Codex Codex AI requested a review from vsilent May 6, 2026 10:27
@vsilent vsilent marked this pull request as ready for review May 7, 2026 08:59
@vsilent vsilent merged commit 43eb73c into main May 7, 2026
6 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

configure-proxy can trigger duplicate nginx-proxy-manager startup

2 participants