Have your say in Community Polls: What was/is your greatest motivation to start your own business?

App hosting deploy using coolify or dokploy

App hosting deploy using coolify or dokploy

Ionuts1
Shopify Partner
24 1 4

Hi guys, i'm trying to avoid a huge cost for hosting/deploying apps made with remix.js on render.com or other similar hosting services. I found coolify or dokploy, i've installed them on my vps and works fine with any other projects i've deployed like Next.js, Astro.js,Laravel, now i want to deploy an shopify app which is throwing some errors while building. The question is what do you guys using to deploy the apps, any recommendations?
Now for who have apps hosted with Coolify or dokploy, any tips?

Logs:

[2024-Jun-27 19:55:55.782698]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 511B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/node:18-alpine

[2024-Jun-27 19:55:56.735378]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#2 DONE 1.1s

[2024-Jun-27 19:55:56.936553]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#3 [internal] load .dockerignore
#3 transferring context: 66B done
#3 DONE 0.0s

#4 [1/7] FROM docker.io/library/node:18-alpine@sha256:e37da457874383fa9217067867ec85fe8fe59f0bfa351ec9752a95438680056e
#4 DONE 0.0s

#5 [internal] load build context

[2024-Jun-27 19:55:56.938100]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#5 transferring context: 629.40kB 0.0s done
#5 DONE 0.0s

#6 [2/7] WORKDIR /app
#6 CACHED

#7 [3/7] COPY . .
#7 DONE 0.0s

#8 [4/7] RUN npm install --omit=dev

[2024-Jun-27 19:56:11.209238]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#8 14.42
#8 14.42 added 615 packages, and audited 616 packages in 14s

[2024-Jun-27 19:56:11.366114]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#8 14.43
#8 14.43 163 packages are looking for funding
#8 14.43 run `npm fund` for details
#8 14.43
#8 14.43 found 0 vulnerabilities
#8 14.43 npm notice
#8 14.43 npm notice New minor version of npm available! 10.7.0 -> 10.8.1
#8 14.43 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
#8 14.43 npm notice To update run: npm install -g npm@10.8.1
#8 14.43 npm notice
[2024-Jun-27 19:56:11.407107]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#8 DONE 14.6s

[2024-Jun-27 19:56:11.559870]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#9 [5/7] RUN npm remove @shopify/app @shopify/cli

[2024-Jun-27 19:56:14.296921]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#9 2.888
#9 2.888 up to date, audited 616 packages in 3s

[2024-Jun-27 19:56:14.472715]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#9 2.888
#9 2.888 163 packages are looking for funding
#9 2.888 run `npm fund` for details
#9 2.891
#9 2.891 found 0 vulnerabilities
#9 DONE 2.9s

#10 [6/7] RUN npm run build

[2024-Jun-27 19:56:14.524689]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#10 0.202
#10 0.202 > build
#10 0.202 > remix vite:build
#10 0.202

[2024-Jun-27 19:56:15.596768]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#10 1.274 failed to load config from /app/vite.config.js

[2024-Jun-27 19:56:15.646467]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
#10 1.280 TypeError [ERR_INVALID_URL]: Invalid URL
#10 1.280 at new NodeError (node:internal/errors:405:5)
#10 1.280 at new URL (node:internal/url:676:13)
#10 1.280 at file:///app/vite.config.js.timestamp-1719518175590-b6608c5b92d32.mjs:9:12
#10 1.280 at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
#10 1.280 at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
#10 1.280 at async loadConfigFromBundledFile (file:///app/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66979:15)
#10 1.280 at async Module.loadConfigFromFile (file:///app/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66820:24)
#10 1.280 at async configResolved (/app/node_modules/@remix-run/dev/dist/vite/plugin.js:729:37)
#10 1.280 at async Promise.all (index 1)
#10 1.280 at async Module.resolveConfig (file:///app/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66692:3) {
#10 1.280 input: '0.0.0.0',
#10 1.280 code: 'ERR_INVALID_URL'
#10 1.280 }
#10 ERROR: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
------
> [6/7] RUN npm run build:
1.280 at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
1.280 at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
1.280 at async loadConfigFromBundledFile (file:///app/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66979:15)
1.280 at async Module.loadConfigFromFile (file:///app/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66820:24)
1.280 at async configResolved (/app/node_modules/@remix-run/dev/dist/vite/plugin.js:729:37)
1.280 at async Promise.all (index 1)
1.280 at async Module.resolveConfig (file:///app/node_modules/vite/dist/node/chunks/dep-C1-ZB6nQ.js:66692:3) {
1.280 input: '0.0.0.0',
1.280 code: 'ERR_INVALID_URL'
1.280 }
------

[2024-Jun-27 19:56:15.648856]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
Dockerfile:14
--------------------
12 | # Remove this line if you want to run CLI commands in your container.
13 | RUN npm remove @shopify/app @shopify/cli
14 | >>> RUN npm run build
15 |
16 | # You'll probably want to remove this in production, it's here to make it easier to test things!
--------------------

[2024-Jun-27 19:56:15.651714]

[COMMAND] docker exec i8kgkww bash -c 'bash /artifacts/build.sh'
[OUTPUT]
ERROR: failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
Replies 2 (2)

fuongduyuid
Shopify Partner
1 0 0

Hi,

I'm facing the same issue while deploy in render.com

INFO
==> Cloning from https://gitlab.com/uid-it/uid-sce-extensions
INFO
==> Checking out commit 191bce5f332594ba42eb124270cc1c16cce83f89 in branch dev
INFO
#1 [internal] load build definition from Dockerfile
INFO
#1 transferring dockerfile: 564B done
INFO
#1 DONE 0.0s
INFO
INFO
#2 [internal] load metadata for docker.io/library/node:18-alpine
INFO
#2 ...
INFO
INFO
#3 [auth] library/node:pull render-prod/docker-mirror-repository/library/node:pull token for us-west1-docker.pkg.dev
INFO
#3 DONE 0.0s
INFO
INFO
#2 [internal] load metadata for docker.io/library/node:18-alpine
INFO
#2 DONE 5.7s
INFO
INFO
#4 [internal] load .dockerignore
INFO
#4 transferring context: 66B done
INFO
#4 DONE 0.0s
INFO
INFO
#5 [1/8] FROM docker.io/library/node:18-alpine@sha256:17514b20acef0e79691285e7a59f3ae561f7a1702a9adc72a515aef23f326729
INFO
#5 resolve docker.io/library/node:18-alpine@sha256:17514b20acef0e79691285e7a59f3ae561f7a1702a9adc72a515aef23f326729 done
INFO
#5 ...
INFO
INFO
#6 [internal] load build context
INFO
#6 transferring context: 951.22kB 0.1s done
INFO
#6 DONE 0.1s
INFO
INFO
#5 [1/8] FROM docker.io/library/node:18-alpine@sha256:17514b20acef0e79691285e7a59f3ae561f7a1702a9adc72a515aef23f326729
INFO
#5 extracting sha256:c6a83fedfae6ed8a4f5f7cbb6a7b6f1c1ec3d86fea8cb9e5ba2e5e6673fde9f6
INFO
#5 extracting sha256:c6a83fedfae6ed8a4f5f7cbb6a7b6f1c1ec3d86fea8cb9e5ba2e5e6673fde9f6 0.2s done
INFO
#5 extracting sha256:1475bb19bdb76a034cba9b274ea9e4298897d6e108dbc81268740d70639f2b69
INFO
#5 extracting sha256:1475bb19bdb76a034cba9b274ea9e4298897d6e108dbc81268740d70639f2b69 2.1s done
INFO
#5 extracting sha256:bc6e437c6fa911e43ef82fe79ec3cf94625557d8426639ee7758448b8a4fb464 0.1s done
INFO
#5 DONE 5.0s
INFO
INFO
#5 [1/8] FROM docker.io/library/node:18-alpine@sha256:17514b20acef0e79691285e7a59f3ae561f7a1702a9adc72a515aef23f326729
INFO
#5 extracting sha256:62c7e5ec2b01a374e0ad0f2299c63d7940a5bdb466c580b243b9977dc12b8ecb done
INFO
#5 DONE 5.0s
INFO
INFO
#7 [2/8] WORKDIR /app
INFO
#7 DONE 0.0s
INFO
INFO
#8 [3/8] COPY package.json package-lock.json* ./
INFO
#8 DONE 0.0s
INFO
INFO
#9 [4/8] RUN npm ci --omit=dev && npm cache clean --force
INFO
#9 21.42 
INFO
#9 21.42 added 606 packages, and audited 608 packages in 21s
INFO
#9 21.42 
INFO
#9 21.42 163 packages are looking for funding
INFO
#9 21.42   run `npm fund` for details
INFO
#9 21.42 
INFO
#9 21.42 found 0 vulnerabilities
NOTICE
#9 21.42 npm notice
NOTICE
#9 21.42 npm notice New minor version of npm available! 10.7.0 -> 10.8.2
NOTICE
#9 21.42 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2
NOTICE
#9 21.42 npm notice To update run: npm install -g npm@10.8.2
NOTICE
#9 21.42 npm notice
WARNING
#9 21.70 npm warn using --force Recommended protections disabled.
INFO
#9 DONE 23.1s
INFO
INFO
#10 [5/8] RUN npm remove @Shopify/cli
INFO
#10 4.456 
INFO
#10 4.456 up to date, audited 608 packages in 4s
INFO
#10 4.456 
INFO
#10 4.456 163 packages are looking for funding
INFO
#10 4.457   run `npm fund` for details
INFO
#10 4.459 
INFO
#10 4.459 found 0 vulnerabilities
INFO
#10 DONE 4.5s
INFO
INFO
#11 [6/8] COPY . .
INFO
#11 DONE 0.0s
INFO
INFO
#12 [7/8] RUN npm run build
INFO
#12 0.340 
INFO
#12 0.340 > build
INFO
#12 0.340 > remix vite:build
INFO
#12 0.340 
ERROR
#12 1.855 Error: Cannot find module @rollup/rollup-linux-x64-musl. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
INFO
#12 1.855     at requireWithFriendlyError (/app/node_modules/rollup/dist/native.js:59:9)
INFO
#12 1.855     at Object.<anonymous> (/app/node_modules/rollup/dist/native.js:68:76)
DEBUG
#12 1.855     ... 3 lines matching cause stack trace ...
INFO
#12 1.855     at Module._load (node:internal/modules/cjs/loader:1019:12)
INFO
#12 1.855     at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:203:29)
INFO
#12 1.855     at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
INFO
#12 1.855     at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
INFO
#12 1.855     at async importModuleDynamicallyWrapper (node:internal/vm/module:432:15) {
ERROR
#12 1.855   [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-musl'
INFO
#12 1.855   Require stack:
INFO
#12 1.855   - /app/node_modules/rollup/dist/native.js
INFO
#12 1.855       at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
INFO
#12 1.855       at Module._load (node:internal/modules/cjs/loader:981:27)
INFO
#12 1.855       at Module.require (node:internal/modules/cjs/loader:1231:19)
INFO
#12 1.855       at require (node:internal/modules/helpers:177:18)
INFO
#12 1.855       at requireWithFriendlyError (/app/node_modules/rollup/dist/native.js:41:10)
INFO
#12 1.855       at Object.<anonymous> (/app/node_modules/rollup/dist/native.js:68:76)
INFO
#12 1.855       at Module._compile (node:internal/modules/cjs/loader:1364:14)
INFO
#12 1.855       at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
INFO
#12 1.855       at Module.load (node:internal/modules/cjs/loader:1203:32)
INFO
#12 1.855       at Module._load (node:internal/modules/cjs/loader:1019:12) {
INFO
#12 1.855     code: 'MODULE_NOT_FOUND',
INFO
#12 1.855     requireStack: [ '/app/node_modules/rollup/dist/native.js' ]
INFO
#12 1.855   }
INFO
#12 1.855 }
ERROR
#12 ERROR: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
INFO
------
INFO
 > [7/8] RUN npm run build:
INFO
1.855       at requireWithFriendlyError (/app/node_modules/rollup/dist/native.js:41:10)
INFO
1.855       at Object.<anonymous> (/app/node_modules/rollup/dist/native.js:68:76)
INFO
1.855       at Module._compile (node:internal/modules/cjs/loader:1364:14)
INFO
1.855       at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
INFO
1.855       at Module.load (node:internal/modules/cjs/loader:1203:32)
INFO
1.855       at Module._load (node:internal/modules/cjs/loader:1019:12) {
INFO
1.855     code: 'MODULE_NOT_FOUND',
INFO
1.855     requireStack: [ '/app/node_modules/rollup/dist/native.js' ]
INFO
1.855   }
INFO
1.855 }
INFO
------
INFO
Dockerfile:18
INFO
--------------------
INFO
  16 |     COPY . .
INFO
  17 |     
INFO
  18 | >>> RUN npm run build
INFO
  19 |     
INFO
  20 |     # You'll probably want to remove this in production, it's here to make it easier to test things!
INFO
--------------------
ERROR
error: failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
ERROR
error: exit status 1

Beraaga007
Visitor
1 0 0

i think you need to delete the node_modules folder before you click deploy, I have the same issue but in Laravel