-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile.backend
34 lines (23 loc) · 1.02 KB
/
Dockerfile.backend
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
30
31
32
33
34
FROM node:18-alpine as build
RUN apk --no-cache add --update git
WORKDIR /usr/main/
RUN yarn set version 2 --only-if-needed
COPY .yarnrc.yml ./.yarnrc.yml
COPY yarn.lock ./yarn.lock
COPY .yarn/ ./.yarn/
COPY package.json ./package.json
COPY backend/src ./backend/src
COPY backend/local.yml ./backend/local.yml
COPY backend/package.json ./backend/package.json
COPY backend/tsconfig.json ./backend/tsconfig.json
COPY backend/babel.config.json ./backend/babel.config.json
COPY backend/rollup.config.js ./backend/rollup.config.js
RUN yarn
RUN yarn build
FROM heroiclabs/nakama:3.13.1 as run
COPY --from=build /usr/main/backend/build/index.js /nakama/data/modules/build/
COPY --from=build /usr/main/backend/local.yml /nakama/data/
EXPOSE 7349
EXPOSE 7350
EXPOSE 7351
ENTRYPOINT /nakama/nakama migrate up --database.address $DB_URI && exec /nakama/nakama --config /nakama/data/local.yml --database.address $DB_URI --console.password $CONSOLE_PASSWORD --runtime.env "TOOLKIT_BASE_URL=$TOOLKIT_BASE_URL" --runtime.env "ZK_ENABLED=$ZK_ENABLED"