RainEggplant / chatgpt-telegram-bot

A ChatGPT bot for Telegram based on Node.js. Support both browserless and browser-base APIs.
MIT License
322 stars 97 forks source link

[Bug]: Container not starting #51

Open vladtsit opened 1 year ago

vladtsit commented 1 year ago

Not a duplicate issue

Verify ChatGPT service is operational

Bot version

v2.5.0

API type

official

Environment details

20_04-lts-gen2, latest docker, docker run -d -v ./bot_config:/app/config raineggplant/chatgpt-telegram-bot:latest

Describe the Bug

getting an error:

chatgpt-telegram-bot@2.5.0 start /app node --experimental-loader=extensionless dist/index.js (node:18) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time (Use node --trace-warnings ... to show where the warning was created)  >ELIFECYCLE  Command failed.

To Reproduce

just start docker again

Logs

no additional logs generated

Additional context

No response

Vadko commented 1 year ago
# Builder stage
FROM node:lts-alpine AS builder

RUN npm install -g pnpm

WORKDIR /app

COPY config /app/config
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --ignore-scripts

COPY . .
RUN pnpm build

# Runner stage
FROM node:lts-alpine

RUN npm install -g pnpm

WORKDIR /app

COPY config /app/config
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --ignore-scripts --prod --no-optional

COPY --from=builder /app/dist ./dist

CMD pnpm start

can you please try using following dockerfile?