File size: 582 Bytes
90bd670 b141afb 90bd670 8d6b63f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# ==== CONFIGURE =====
# Use a Node 18 base image
FROM node:18
# Set the working directory to /code inside the container
WORKDIR /code
# Copy app files
COPY . .
# ==== BUILD =====
# Install dependencies (npm ci makes sure the exact versions in the lockfile gets installed)
RUN npm ci
# Build the app
RUN npm run build
# ==== RUN =======
# Set the env to "production"
ENV NODE_ENV production
# Expose the port on which the app will be running (3000 is the default that `serve` uses)
EXPOSE 7860
# Start the proxy and app
CMD ["bash", "-c", "node server.js & npx serve -l 7860 build"] |