jww0510
September 10, 2023, 4:24pm
1
Hey everyone, I had deployed my discord bot on fly.io for a while and everything just worked fine except one small problem.
When someone joins the server, the bot always sends welcome messages three times, but when I host on my computer it only sends once.
Is this a problem about the number of VMs I used? And how can I fix it??
Thanks for all your replies!
jww0510
September 11, 2023, 2:04pm
3
Here is my docker file contents:
`ARG NODE_VERSION=19.8.1
FROM node:${NODE_VERSION}-slim as base
LABEL fly_launch_runtime=“Node.js”
Node.js app lives here
WORKDIR /app
Set production environment
ENV NODE_ENV=“production”
Throw-away build stage to reduce size of final image
FROM base as build
Install packages needed to build node modules
RUN apt-get update -qq &&
apt-get install -y build-essential pkg-config python-is-python3
Install node modules
COPY --link package-lock.json package.json ./
RUN npm ci
Copy application code
COPY --link . .
Final stage for app image
FROM base
Copy built application
COPY --from=build /app /app
Start the server by default, this can be overwritten at runtime
EXPOSE 3000
CMD [ “npm”, “run”, “start” ]`
Seems like not, all variables are just the same, and I used .env to set global variables on my local computer
Actually I haven’t tried it yet, is there any command to do that??
Thanks for your reply!!!
system
Closed
September 18, 2023, 2:05pm
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.