Skip to content

Instantly share code, notes, and snippets.

@nicolasaigner
Created June 13, 2022 01:35
Show Gist options
  • Select an option

  • Save nicolasaigner/9a4b579a86afbe45c7417525487f64c1 to your computer and use it in GitHub Desktop.

Select an option

Save nicolasaigner/9a4b579a86afbe45c7417525487f64c1 to your computer and use it in GitHub Desktop.
Dockerfile Strapi V4
FROM node:16.0.0
ARG NODE_ENV=development
ENV NODE_ENV $NODE_ENV
ARG DATABASE_HOST=postgres
ENV DATABASE_HOST $DATABASE_HOST
ARG DATABASE_PORT=5432
ENV DATABASE_PORT $DATABASE_PORT
ARG DATABASE_NAME=postgres
ENV DATABASE_NAME $DATABASE_NAME
ARG DATABASE_USERNAME=postgres
ENV DATABASE_USERNAME $DATABASE_USERNAME
ARG DATABASE_PASSWORD=strapi
ENV DATABASE_PASSWORD $DATABASE_PASSWORD
ARG DATABASE_SSL=false
ENV DATABASE_SSL $DATABASE_SSL
WORKDIR /usr/src/app
COPY . .
RUN yarn install
EXPOSE 1337
CMD ["yarn", "develop"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment