Unable to deploy generic Remix Indie Stack

Hello all,

I’m desperately trying to deploy a Remix basic Indie Stack by following the Readme.
But I’m running with the below “Permission denied” when the machine tries to run start.sh file.

If anyone can help… I did not find anybody having the same issue

Thanks in advance !

Nico


2023-04-22T14:45:59.715 proxy[5683dde9b4e2e8] dfw [info] Starting machine

2023-04-22T14:46:00.006 app[5683dde9b4e2e8] dfw [info] Starting init (commit: ed64554)...

2023-04-22T14:46:00.020 app[5683dde9b4e2e8] dfw [info] Mounting /dev/vdb at /data w/ uid: 0, gid: 0 and chmod 0755

2023-04-22T14:46:00.022 app[5683dde9b4e2e8] dfw [info] Preparing to run: `./start.sh` as root

2023-04-22T14:46:00.025 app[5683dde9b4e2e8] dfw [info] Error: UnhandledIoError(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })

2023-04-22T14:46:00.026 app[5683dde9b4e2e8] dfw [info] [ 0.099376] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100

2023-04-22T14:46:00.027 app[5683dde9b4e2e8] dfw [info] [ 0.100084] CPU: 0 PID: 1 Comm: init Not tainted 5.12.2 #1

2023-04-22T14:46:00.027 app[5683dde9b4e2e8] dfw [info] [ 0.100588] Call Trace:

2023-04-22T14:46:00.027 app[5683dde9b4e2e8] dfw [info] [ 0.100828] show_stack+0x52/0x58

2023-04-22T14:46:00.028 app[5683dde9b4e2e8] dfw [info] [ 0.101150] dump_stack+0x6b/0x86

2023-04-22T14:46:00.028 app[5683dde9b4e2e8] dfw [info] [ 0.101460] panic+0xfb/0x2bc

2023-04-22T14:46:00.028 app[5683dde9b4e2e8] dfw [info] [ 0.101744] do_exit.cold+0x60/0xb0

2023-04-22T14:46:00.029 app[5683dde9b4e2e8] dfw [info] [ 0.102067] do_group_exit+0x3b/0xb0

2023-04-22T14:46:00.029 app[5683dde9b4e2e8] dfw [info] [ 0.102401] __x64_sys_exit_group+0x18/0x20

2023-04-22T14:46:00.029 app[5683dde9b4e2e8] dfw [info] [ 0.102785] do_syscall_64+0x38/0x50

2023-04-22T14:46:00.030 app[5683dde9b4e2e8] dfw [info] [ 0.103126] entry_SYSCALL_64_after_hwframe+0x44/0xae

2023-04-22T14:46:00.030 app[5683dde9b4e2e8] dfw [info] [ 0.103592] RIP: 0033:0x7f191ce978c3

2023-04-22T14:46:00.032 app[5683dde9b4e2e8] dfw [info] [ 0.103929] Code: eb ef 48 8b 76 28 e9 9b 03 00 00 64 48 8b 04 25 00 00 00 00 48 8b b0 b0 00 00 00 e9 af ff ff ff 48 63 ff b8 e7 00 00 00 0f 05 <ba> 3c 00 00 00 48 89 d0 0f 05 eb f9 90 ba 64 2f 00 00 c6 47 0e 00

2023-04-22T14:46:00.032 app[5683dde9b4e2e8] dfw [info] [ 0.105623] RSP: 002b:00007ffc454e3f78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7

2023-04-22T14:46:00.033 app[5683dde9b4e2e8] dfw [info] [ 0.106284] RAX: ffffffffffffffda RBX: 00007f191cc8aa80 RCX: 00007f191ce978c3

2023-04-22T14:46:00.034 app[5683dde9b4e2e8] dfw [info] [ 0.106907] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001

2023-04-22T14:46:00.034 app[5683dde9b4e2e8] dfw [info] [ 0.107551] RBP: 0000000000000001 R08: 00007f191cf91628 R09: 0000000000000000

2023-04-22T14:46:00.035 app[5683dde9b4e2e8] dfw [info] [ 0.108196] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc454e3fd8

2023-04-22T14:46:00.036 app[5683dde9b4e2e8] dfw [info] [ 0.108844] R13: 00007ffc454e3fe8 R14: 0000000000000000 R15: 0000000000000000

2023-04-22T14:46:00.036 app[5683dde9b4e2e8] dfw [info] [ 0.109526] Kernel Offset: disabled

2023-04-22T14:46:00.036 app[5683dde9b4e2e8] dfw [info] [ 0.109848] Rebooting in 1 seconds..

2023-04-22T14:46:01.211 app[5683dde9b4e2e8] dfw [warn] Virtual machine exited abruptly

2023-04-22T14:46:01.987 runner[5683dde9b4e2e8] dfw [info] machine exited with exit code 0, not restarting```

Hey, it would be easier to figure this out if you could share your Dockerfile content here, but on first scan either your ./start.sh script was not into the image at that path or it does not have executable rights.

Sure, I have not touched the file proposed by Remix team, here it is :slight_smile:

# base node image
FROM node:16-bullseye-slim as base

# set for base and all layer that inherit from it
ENV NODE_ENV production

# Install openssl for Prisma
RUN apt-get update && apt-get install -y openssl sqlite3

# Install all node_modules, including dev dependencies
FROM base as deps

WORKDIR /myapp

ADD package.json package-lock.json .npmrc ./
RUN npm install --production=false

# Setup production node_modules
FROM base as production-deps

WORKDIR /myapp

COPY --from=deps /myapp/node_modules /myapp/node_modules
ADD package.json package-lock.json .npmrc ./
RUN npm prune --production

# Build the app
FROM base as build

WORKDIR /myapp

COPY --from=deps /myapp/node_modules /myapp/node_modules

ADD prisma .
RUN npx prisma generate

ADD . .
RUN npm run build

# Finally, build the production image with minimal footprint
FROM base

ENV DATABASE_URL=file:/data/sqlite.db
ENV PORT="8080"
ENV NODE_ENV="production"

# add shortcut for connecting to database CLI
RUN echo "#!/bin/sh\nset -x\nsqlite3 \$DATABASE_URL" > /usr/local/bin/database-cli && chmod +x /usr/local/bin/database-cli

WORKDIR /myapp

COPY --from=production-deps /myapp/node_modules /myapp/node_modules
COPY --from=build /myapp/node_modules/.prisma /myapp/node_modules/.prisma

COPY --from=build /myapp/build /myapp/build
COPY --from=build /myapp/public /myapp/public
COPY --from=build /myapp/package.json /myapp/package.json
COPY --from=build /myapp/start.sh /myapp/start.sh
COPY --from=build /myapp/prisma /myapp/prisma

ENTRYPOINT [ "./start.sh" ]

Add this line RUN chmod +x /myapp/start.sh just before ENTRYPOINT

Yiha, that worked !
Thanks a lot !

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.