Twitch_Highlight_Marker/Dockerfile

25 lines
591 B
Docker
Raw Permalink Normal View History

2021-04-20 09:27:44 +00:00
FROM node:14.16.0
# Create working directory and copy required code files
2021-04-20 09:27:44 +00:00
RUN mkdir /workdir
ADD bot.js /workdir/bot.js
ADD package.json /workdir/package.json
ADD package-lock.json /workdir/package-lock.json
# Set the working directory
2021-04-20 09:27:44 +00:00
WORKDIR /workdir
# Install npm packages
2021-04-20 09:27:44 +00:00
RUN npm i
# Declare required environment variables
ENV API_BEARER ""
ENV IRC_OAUTH ""
ENV ACCESS_KEY ""
# Rewrite .env file every time the container starts
CMD "echo \"API_BEARER=$API_BEARER\nIRC_OAUTH=$IRC_OAUTH\nACCESS_KEY=$ACCESS_KEY\" > /workdir/.env"
CMD "cat .env"
# Start the bot
2021-04-20 09:27:44 +00:00
CMD ["node", "bot.js"]