23 lines
627 B
Plaintext
23 lines
627 B
Plaintext
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022
|
|
WORKDIR C:\\app
|
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
|
|
|
|
# Download Node.js 18
|
|
RUN curl.exe -o node.zip https://nodejs.org/dist/v18.2.0/node-v18.2.0-win-x64.zip && \
|
|
mkdir "C:\\Program Files\\node" && \
|
|
tar.exe -xf node.zip -C "C:\\Program Files\\node" --strip-components=1
|
|
|
|
# Add node to PATH
|
|
RUN setx path "%path%;C:\\Program Files\\node"
|
|
|
|
# Test Node & NPM
|
|
RUN node -v && \
|
|
npm -v
|
|
|
|
COPY . .
|
|
RUN npm ci --production
|
|
|
|
EXPOSE 3001
|
|
HEALTHCHECK --interval=60s --timeout=30s --start-period=180s --retries=5 CMD node extra/healthcheck.js
|
|
CMD ["node.exe", "server/server.js"]
|