2022-09-05 09:08:14 +03:00
|
|
|
FROM node:16-alpine
|
|
|
|
|
2022-10-26 20:08:56 +03:00
|
|
|
RUN apk update && apk add curl
|
|
|
|
|
2022-09-05 09:08:14 +03:00
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json .
|
|
|
|
COPY package-lock.json .
|
|
|
|
COPY dc-api-types dc-api-types
|
|
|
|
WORKDIR /app/sqlite
|
|
|
|
COPY ./sqlite/package.json .
|
|
|
|
|
|
|
|
RUN npm ci
|
|
|
|
|
|
|
|
COPY ./sqlite/tsconfig.json .
|
|
|
|
COPY ./sqlite/src src
|
|
|
|
|
|
|
|
# This is just to ensure everything compiles ahead of time.
|
|
|
|
# We'll actually run using ts-node to ensure we get TypesScript
|
|
|
|
# stack traces if something fails at runtime.
|
|
|
|
RUN npm run typecheck
|
|
|
|
|
|
|
|
EXPOSE 8100
|
|
|
|
|
|
|
|
# We don't bother doing typechecking when we run (only TS->JS transpiling)
|
|
|
|
# because we checked it above already. This uses less memory at runtime.
|
|
|
|
CMD [ "npm", "run", "--silent", "start-no-typecheck" ]
|