feat(cli): containr migrate dflow + fix railway service types (#53)

dflow importer pages the Payload REST collections (users API-Key
auth) and recreates projects/services: app→git web services, docker
→image, database→typed image with DATABASE_URL for external
providers; variables (empty encrypted values flagged), bind volumes,
and domains carried over; soft-deleted docs excluded.

Also fixes the Railway migrator posting type "image"/"git" — the
create API only accepts web|worker|database|cron and requires an
environment, so every service create 400'd.

Generated with [Devin](https://devin.ai)

Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomáš DvořákandDevin authored and GitHub committed 2026-10-09 14:37:26 +02:00
1 parent ee43064c5c
commit ae7e6b4991
6 files changed
+536 -7

No files matched your search

+5 -3
View File
@@ -121,12 +121,14 @@ Token: account/workspace token (Authorization: Bearer) or a project token.
}
for _, p := range plans {
body := map[string]interface{}{"name": p.Name}
body := map[string]interface{}{
"name": p.Name,
"type": "web",
"environment": "production",
}
if p.Source.Image != "" {
body["type"] = "image"
body["image"] = p.Source.Image
} else if repo := railwayRepoURL(p.Source.Repo); repo != "" {
body["type"] = "git"
body["git_repo"] = repo
} else {
fmt.Fprintf(os.Stderr, "warning: %s has no source — skipping\n", p.Name)