Something went wrong. Try again.
A social knowledge tool for researchers built on ATProto
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546# syntax = docker/dockerfile:1
# Adjust NODE_VERSION as desiredARG NODE_VERSION=18.18.2FROM node:${NODE_VERSION}-slim AS base
LABEL fly_launch_runtime="Node.js"
# Node.js app lives hereWORKDIR /app
# Set production environmentENV NODE_ENV="dev"
# Throw-away build stage to reduce size of final imageFROM base AS build
# Install packages needed to build node modulesRUN apt-get update -qq && \ apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3
# Install node modulesCOPY package-lock.json package.json ./RUN npm ci --include=dev
# Copy application codeCOPY . .
# Build applicationRUN npm run build
# Remove development dependenciesRUN npm prune --omit=dev
# Final stage for app imageFROM base
# Copy built applicationCOPY --from=build /app /app
# Start the server by default, this can be overwritten at runtimeEXPOSE 3000CMD [ "node", "dist/index.js" ]