mirror of
https://github.com/FoxxMD/context-mod.git
synced 2026-01-13 15:38:12 -05:00
* Check for in-use web port before starting so we can display a useful error message * Remove 'web' command and instead make it an optional argument for `run` (default to web) * Update dockerfile to use run command * Remove remaining commander option defaults since they are defined in config builder now
32 lines
457 B
Docker
32 lines
457 B
Docker
FROM node:16-alpine3.12
|
|
|
|
ENV TZ=Etc/GMT
|
|
|
|
RUN apk update
|
|
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
WORKDIR /usr/app
|
|
|
|
COPY package*.json ./
|
|
COPY tsconfig.json .
|
|
|
|
RUN npm install
|
|
|
|
ADD . /usr/app
|
|
|
|
RUN npm run build
|
|
|
|
ENV NPM_CONFIG_LOGLEVEL debug
|
|
|
|
ARG log_dir=/home/node/logs
|
|
RUN mkdir -p $log_dir
|
|
VOLUME $log_dir
|
|
ENV LOG_DIR=$log_dir
|
|
|
|
ARG webPort=8085
|
|
ENV PORT=$webPort
|
|
EXPOSE $PORT
|
|
|
|
CMD [ "node", "src/index.js", "run" ]
|