Last active
July 15, 2020 11:49
-
-
Save sumitsahoo/fb54bbf68a80a8f669970e521d5175a4 to your computer and use it in GitHub Desktop.
Start strapi in dev configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the official lightweight Node.js image. | |
# https://hub.docker.com/_/node | |
FROM node:14.5.0-slim | |
# Create and change to the app directory. | |
WORKDIR /usr/src/app | |
# Set PROD/DEV environment | |
ENV NODE_ENV=development | |
#ENV NODE_ENV=production | |
# Copy application dependency manifests to the container image. | |
# A wildcard is used to ensure both package.json AND package-lock.json are copied. | |
# Copying this separately prevents re-running npm install on every code change. | |
COPY package*.json ./ | |
# Update packages | |
RUN apt-get update -y | |
# Install yarn | |
RUN apt-get install yarn -y | |
# GCC, G++, Python, Make needed if Node version > 12. When v12 in use you can comment out below dependencies | |
RUN apt-get install gcc -y | |
RUN apt-get install g++ -y | |
RUN apt-get install python3 -y | |
RUN apt-get install make -y | |
# Install production dependencies. | |
RUN yarn install --production=true | |
# Copy local code to the container image. | |
COPY . ./ | |
# Build Strapi | |
RUN yarn build | |
#EXPOSE 1337 | |
# Run the web service on container startup. | |
CMD [ "yarn", "develop" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment