mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-01-22 20:58:01 -05:00
34 lines
771 B
Docker
34 lines
771 B
Docker
FROM node:12 as base
|
|
WORKDIR /usr/src/app
|
|
|
|
ARG GRAPHQL_HOST
|
|
|
|
ENV GRAPHQL_URL https://$GRAPHQL_HOST.onrender.com/v1/graphql
|
|
ENV HASURA_GRAPHQL_ADMIN_SECRET metagame_secret
|
|
|
|
# Install dependencies for dev and prod
|
|
COPY package.json .
|
|
COPY lerna.json .
|
|
COPY yarn.lock .
|
|
COPY schema.graphql .
|
|
COPY tsconfig.base.json .
|
|
COPY packages/discord-bot/*.json ./packages/discord-bot/
|
|
COPY packages/utils/*.json ./packages/utils/
|
|
|
|
RUN yarn install --pure-lockfile
|
|
|
|
# Dev environment doesn't run this stage or beyond
|
|
FROM base as build
|
|
|
|
# Copy source files
|
|
COPY packages/discord-bot ./packages/discord-bot/
|
|
COPY packages/utils ./packages/utils/
|
|
COPY packages/@types ./packages/@types/
|
|
|
|
# Build
|
|
RUN yarn discord-bot build
|
|
|
|
ENV RUNTIME_ENV=docker
|
|
|
|
CMD [ "yarn", "discord-bot", "start" ]
|