Preview Compose deletes the compose's .env
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 53/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- docker-compose, git, typescript
Direzione di ricerca
Read compose.fetchSourceType, cloneCompose, and the Git providers’ outputPathOverride handling, then trace the preview dialog and loadServices refresh path. Check how getBuildComposeCommand writes .env and how startCompose uses the checkout. The reported failure is resolved when preview and refresh leave the deployed checkout, .env, and deployed commit intact.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
To Reproduce
- Create a Docker Compose service from a GitHub repo, with "Create Env File" on and a compose file whose variables are required (
${WEB_ORIGIN:?...}). - Deploy it. The
.envis now next to the compose file in/etc/dokploy/compose/<appName>/code/. - Open General → Preview Compose.
- Look at that folder again: the
.envis gone, andgit reflogincode/shows a fresh clone. - Run a
docker composecommand for the project from that folder. Ours is a server schedule:docker compose -p <appName> -f deploy/dokploy/compose.yaml --profile ops run --rm ops <command>. It fails with:
error while interpolating services.worker.environment.WEB_ORIGIN: required variable WEB_ORIGIN is missing a value
Current vs. Expected behavior
I expected the preview to leave the deployed compose as it was. Instead it re-clones the repo and the .env from the last deploy is gone. The running containers are fine, but anything that runs docker compose in that folder fails until the next deploy. Two nightly schedules of ours failed the night after I opened the preview.
Provide environment information
Operating System:
OS: Debian GNU/Linux 13 (trixie)
Arch: x86_64
Dokploy version: v0.31.0
VPS Provider: OVH
What applications/services are you tying to deploy?
Docker Compose from GitHub (Node API, worker, Postgres, nginx), plus server schedules that run `docker compose ... run` on it
Docker 29.9.3, Docker Compose v5.6.1
Which area(s) are affected? (Select all that apply)
Docker Compose
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
The dialog calls compose.fetchSourceType when it opens. That runs cloneCompose, and the git providers start with rm -rf on the code path. The .env is only written in getBuildComposeCommand, so only a deploy brings it back. The refresh button next to the service picker (loadServices with type: "fetch") does the same.
From reading startCompose, it runs docker compose up -d in that same folder without --env-file, so I'd expect Start to break the same way after a preview. I haven't tried that one.
I think the preview and loadServices should clone into a temporary folder, read the compose from there and remove it, so code/ only changes on a deploy. The git providers already take an outputPathOverride. Writing the .env back after the clone would hide the error, but code/ would still be left on the latest commit of the branch instead of the deployed one, and a Start after that would bring up a compose that was never deployed.
Will you send a PR to fix it?
Yes
- Lingua principale
- TypeScript
- Stelle
- 38.8k
- Fork
- 3.2k
- Merge medio
- 1g 10h
- PR unite (30g)
- 110
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Dokploy/dokploy
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Dokploy/dokploy#6151 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Healthy Swarm task shows an empty `(Error:)` suffix on the last row of the Containers tabForse già presa @AyhamJo7 l’ha presa 4 giorni fa. Apertaneeds-triage🔍
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Dokploy/dokploy#6115 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Global search (Cmd/Ctrl+J) never sorts results by relevanceForse già presa @hamidzr l’ha presa 6 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Dokploy/dokploy#6107 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`utils/dns/ovh.ts`: the zone-listing 403 handler replaces the provider's error instead of chaining itForse già presa @SyncWithRaj l’ha presa 8 giorni fa. Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
Dokploy/dokploy#6075 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
MongoDB with Replica Sets enabled: container exits with code 0 and restarts in a loop (generated startup script never waits on mongod)Forse già presa @ghazy2001 l’ha presa 10 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Dokploy/dokploy#6051 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Dokploy/dokploy
Issue simili
-
[Bug]: RUN_STARTED resets the run's tool-call tally even when a subscriber suppresses the eventApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
ag-ui-protocol/ag-ui#3504 ·
I maintainer di solito rispondono entro 1 giorno
-
area/profiles area/sessions comp/desktop desktop/chat desktop/sessions P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
NousResearch/hermes-agent#161712 ·
I maintainer di solito rispondono entro 1 giorno
-
bug p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rothgar/rabble.radio#283 ·
I maintainer di solito rispondono entro 1 giorno
-
bug from-app needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
nightly-labs/openbot#19805 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
OHDSI/Data2Evidence#3760 ·
I maintainer di solito rispondono entro 3 giorni