-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
29 lines (18 loc) · 891 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM --platform=linux/amd64 node:16-alpine AS build
WORKDIR /usr/src/app
RUN apk add git && \
git clone --branch 'main' 'https://github.com/andrei0x309/gather-town-WS-POAP-bot.git' && \
cd gather-town-WS-POAP-bot && \
yarn build-all
FROM --platform=linux/amd64 node:16-alpine
ENV NODE_ENV production
ENV FASTIFY_ADDRESS 0.0.0.0
RUN yarn global add pm2
WORKDIR /usr/src/app
COPY --from=build /usr/src/app/gather-town-WS-POAP-bot/frontend/dist/ ./frontend/dist/
COPY --from=build /usr/src/app/gather-town-WS-POAP-bot/lib/ ./lib/
COPY --from=build /usr/src/app/gather-town-WS-POAP-bot/backend/ ./backend/
# In case of using mongo DB you can have a docker without using a volume
# Uncomment the copy line below and make sure you have the file main.json with the necesary information
#COPY main.json ./db/main.json
CMD pm2-runtime start /usr/src/app/backend/index.js