Failing to restore back-up in manual install with stack deploy on docker-compose
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
What problem will this feature address?
I am having issues with backup restore on a manual install setup. I use docker stack deploy with compose file to deploy dokploy containers. However in this mode swarm service naming convention differs from one where you run services by invoking docker service create --name=servicename, as it will put an underscore between stack name and service name.
For example if I run ocker stack deploy -c docker-compose.yaml dokploy - it will create a postgres service named dokploy_postgres not dokploy-postgresql as dokploy backup system expects
Postgress container name is assumed in line: https://github.com/Dokploy/dokploy/blob/b95dfed8fc49cb916cd42d1ca87884963ba475c3/packages/server/src/utils/backups/web-server.ts#L41
Describe the solution you'd like
You could use docker labels instead: https://docs.docker.com/engine/cli/filter/#multiple-negated-filters
This would require updating back-up script to be ready to search it both ways (backward compatibility) and update install/update script and instructions on container creation.
Describe alternatives you've considered
Creating services using docker service create. However it's not as declarative as nice docker-compose file.
Additional context
error log:
Starting Deployment Worker
Error: Dokploy Postgres container not found
at sp (dist/server.mjs:150:4045)
⨯ unhandledRejection: Error: Dokploy Postgres container not found
at sp (dist/server.mjs:150:4045)
Will you send a PR to implement it?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at packages/server/src/utils/backups/web-server.ts around line 41 and reproduce the restore failure with a Docker Swarm stack deployment. Trace how the Postgres service is located, then review the install/update scripts and container-creation instructions mentioned in the issue. Done means backup restore supports both service naming conventions without breaking existing installations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, postgresql, typescript
- Domain
- backend, databases, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100