coolify: [Bug]: Failed To Deploy Bun App
Description
Error when deploy Bun App (Elysia)
Minimal Reproduction (if possible, example repository)
Deploy Bare minium Bun app with Elysia Framework with Nixpack: https://github.com/iyansr/test-elysia
The error log says ERROR: failed to solve: process "/bin/bash -ol pipefail -c bun i --no-save" did not complete successfully: exit code: 132
Exception or Error
[2024-Aug-02 03:29:03.556415] Starting deployment of iyansr/test-elysia:main to localhost.
[2024-Aug-02 03:29:03.779226] Preparing container with helper image: ghcr.io/coollabsio/coolify-helper:latest.
[2024-Aug-02 03:29:07.559904] Image not found (igowo4c:33c63fa4597c7ec8d4d74cfbf79e1620ef1c5e21). Building new image.
[2024-Aug-02 03:29:07.996401] ----------------------------------------
[2024-Aug-02 03:29:08.003692] Importing iyansr/test-elysia:main (commit sha HEAD) to /artifacts/lscgckg.
[2024-Aug-02 03:29:10.668657] Generating nixpacks configuration with: nixpacks plan -f toml /artifacts/lscgckg
[2024-Aug-02 03:29:11.212251] Found application type: node.
[2024-Aug-02 03:29:11.215882] If you need further customization, please check the documentation of Nixpacks: https://nixpacks.com/docs/providers/node
[2024-Aug-02 03:29:12.128105] ----------------------------------------
[2024-Aug-02 03:29:12.132614] Building docker image started.
[2024-Aug-02 03:29:12.136659] To check the current progress, click on Show Debug Logs.
[2024-Aug-02 03:29:17.917481] Oops something is not okay, are you okay? π’
[2024-Aug-02 03:29:17.921747] #0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 979B 0.0s done
#1 DONE 0.1s
#2 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1716249803
#2 DONE 1.3s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.1s
#4 [stage-0 1/9] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1716249803@sha256:5ef4d2021c418fcaabb56cea5ea9e24a5fdedfe27f58062d9689214dfed45c46
#4 DONE 0.0s
#5 [internal] load build context
#5 transferring context: 21.08kB 0.0s done
#5 DONE 0.1s
#6 [stage-0 3/9] COPY .nixpacks/nixpkgs-bdd2f439c62aa0b8aa97f5c784a965c23f968fe6.nix .nixpacks/nixpkgs-bdd2f439c62aa0b8aa97f5c784a965c23f968fe6.nix
#6 CACHED
#7 [stage-0 4/9] RUN nix-env -if .nixpacks/nixpkgs-bdd2f439c62aa0b8aa97f5c784a965c23f968fe6.nix && nix-collect-garbage -d
#7 CACHED
#8 [stage-0 2/9] WORKDIR /app/
#8 CACHED
#9 [stage-0 5/9] RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends curl wget
#9 CACHED
#10 [stage-0 6/9] COPY . /app/.
#10 DONE 0.4s
#11 [stage-0 7/9] RUN --mount=type=cache,id=igowo4c-/root/bun,target=/root/.bun bun i --no-save
#11 ERROR: process "/bin/bash -ol pipefail -c bun i --no-save" did not complete successfully: exit code: 132
------
> [stage-0 7/9] RUN --mount=type=cache,id=igowo4c-/root/bun,target=/root/.bun bun i --no-save:
------
Dockerfile:20
--------------------
18 | ENV NIXPACKS_PATH /app/node_modules/.bin:$NIXPACKS_PATH
19 | COPY . /app/.
20 | >>> RUN --mount=type=cache,id=igowo4c-/root/bun,target=/root/.bun bun i --no-save
21 |
22 | # build phase
--------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c bun i --no-save" did not complete successfully: exit code: 132
[2024-Aug-02 03:29:17.927167] Deployment failed. Removing the new version of your application.
Version
v4.0.0-beta.319
Cloud?
- Yes
- No
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (2 by maintainers)
That toml snippet I shared just needs to be saved as nixpacks.toml at the root of your project and in your coolify configuration(ui) make sure Nixpacks is set (itβs usually the default) also the build and run scripts would need to be yours for elysia commands
Added the nixpacks to my root folder but still getting the same error:
This is my nixpacks config shown when building the docker image:
Here is my nixpacks:
Iβve cloned your repo and deployed it on my instance, it works fine for me. Did you modify the install command? Normally, Nixpacks should just run
bun installand nothing else. Also, yourpackage.jsondoesnβt include anybuildandstartsteps. If you just want to run the development build on Coolify, change the start command tobun dev:The Elysia documentation also provides info about the scripts normally included in the
package.jsonfile: https://elysiajs.com/quick-start.html#manual-installation