Description
Description
I'm seeing inconsistent behavior when deploying the same Docker Compose configuration depending on how the stack is created.
Expected Behavior
Creating a stack from a Git repository should behave the same as creating a regular stack with the same Compose file and .env file. If the .env values are being loaded successfully, the external network reference should resolve the same way it does for local deployments and manually created stacks.
Actual Behavior
The deployment fails with:
Error: network "test_network" declared as external, but could not be found
Additional Details
- The external network (
test_network) does exist locally.
- The Compose file is identical in all cases.
- The
.env file appears to be loaded correctly during Git-based stack creation.
- The
.env file is intentionally not committed to the Git repository and is only supplied during stack creation.
Steps to reproduce
-
Create a Docker Compose file that references an external network (whose name is provided via .env).
-
Create the required external network locally (eg. test_network).
-
Verify that:
- Running the Compose file locally succeeds.
- Creating a regular stack in Dockhand using the same Compose file and supplying the
.env file also succeeds.
-
Commit and push only the Compose file to a Git repository. Do not commit the .env file.
-
In Dockhand, create a new stack using the Git repository as the source.
-
Upload/provide the same .env file during stack creation.
-
Start the deployment.
Logs
2026-07-11T12:46:41.743Z [Stack:test-stack] Spawning docker compose process from /app/data/stacks/Direct Socket/test-stack: docker compose -p test-stack -f /app/data/stacks/Direct Socket/test-stack/compose.yml --env-file /app/data/stacks/Direct Socket/test-stack/.env.dockhand up -d --remove-orphans --force-recreate
2026-07-11T12:46:41.863Z [Stack:test-stack] ----------------------------------------
2026-07-11T12:46:41.863Z [Stack:test-stack] COMPOSE PROCESS COMPLETE
2026-07-11T12:46:41.863Z [Stack:test-stack] ----------------------------------------
2026-07-11T12:46:41.863Z [Stack:test-stack] Exit code: 1
2026-07-11T12:46:41.863Z [Stack:test-stack] Timed out: false
2026-07-11T12:46:41.863Z [Stack:test-stack] STDERR:
2026-07-11T12:46:41.863Z network "test_network" declared as external, but could not be found
2026-07-11T12:46:41.863Z [Stack:test-stack] ========================================
2026-07-11T12:46:41.863Z [Stack:test-stack] DEPLOY STACK RESULT
2026-07-11T12:46:41.863Z [Stack:test-stack] ========================================
2026-07-11T12:46:41.863Z [Stack:test-stack] Success: false
2026-07-11T12:46:41.863Z [Stack:test-stack] Error: network "test_network" declared as external, but could not be found
Browser logs
Dockhand version
v1.0.36
Hawser version (if used)
No response
Connection mode
socket
Please confirm the following
Description
Description
I'm seeing inconsistent behavior when deploying the same Docker Compose configuration depending on how the stack is created.
Expected Behavior
Creating a stack from a Git repository should behave the same as creating a regular stack with the same Compose file and
.envfile. If the.envvalues are being loaded successfully, the external network reference should resolve the same way it does for local deployments and manually created stacks.Actual Behavior
The deployment fails with:
Additional Details
test_network) does exist locally..envfile appears to be loaded correctly during Git-based stack creation..envfile is intentionally not committed to the Git repository and is only supplied during stack creation.Steps to reproduce
Create a Docker Compose file that references an external network (whose name is provided via
.env).Create the required external network locally (eg.
test_network).Verify that:
.envfile also succeeds.Commit and push only the Compose file to a Git repository. Do not commit the
.envfile.In Dockhand, create a new stack using the Git repository as the source.
Upload/provide the same
.envfile during stack creation.Start the deployment.
Logs
Browser logs
Dockhand version
v1.0.36
Hawser version (if used)
No response
Connection mode
socket
Please confirm the following