Running cross compiled Bun App failing on startup due to migration issue #820
Unanswered
dylanhillier
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You can try to embed migrations in the binary: https://github.com/uptrace/uptrace/blob/master/pkg/bunapp/pgmigrations/main.go#L11-L12 Or figure out how current working dir works on Linux. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a bun application i have been developing on my Mac with the intent to deploy it to an Ubuntu server. As such, i have built it using:
env GOOS=linux GOARCH=amd64 go build -o myapp cmd/bun/main.go
After copying it over to the ubuntu server the app will not run because it is unable to find migrations. I have tried copying over the migrations and putting them in various different directories but have had no luck.
On execution i see an error like this:
Is this (cross compiling a bun app) just something that will never work, or is there a way to work around this issue?
I do realist i could just build it on an Ubuntu server, or on mac in a container, but i'd rather avoid that if i can.
Beta Was this translation helpful? Give feedback.
All reactions