28 lines
637 B
Docker
28 lines
637 B
Docker
FROM node:20-alpine
|
|
|
|
# Set working directory inside the container
|
|
WORKDIR /usr/src/app
|
|
|
|
# Copy the package.json and lock file (if applicable)
|
|
COPY ./package.json ./
|
|
# Bun lock file is unnecessary unless you're using Bun, which you're not here.
|
|
|
|
# Install dependencies
|
|
RUN npm install --no-audit --silent
|
|
|
|
# Copy the rest of the application code
|
|
COPY . .
|
|
|
|
# Build the Strapi admin panel
|
|
RUN npm run build
|
|
|
|
# Expose the application port
|
|
EXPOSE 1337
|
|
|
|
# Command to start the application
|
|
CMD ["npm", "start"]
|
|
|
|
|
|
# DO NOT FORGET .ENV FILEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
|
|
# Remove sqlite from database.ts config if not using it
|