Created
August 8, 2019 09:33
-
-
Save FrancisVarga/83ab9b556775e791cfa2be97fee4873f to your computer and use it in GitHub Desktop.
strapi app
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
FROM ubuntu:latest | |
LABEL maintainer="Luca Perret <[email protected]>" \ | |
org.label-schema.vendor="Strapi" \ | |
org.label-schema.name="Strapi Docker image" \ | |
org.label-schema.description="Strapi containerized" \ | |
org.label-schema.url="https://strapi.io" \ | |
org.label-schema.vcs-url="https://github.com/strapi/strapi-docker" \ | |
org.label-schema.version=latest \ | |
org.label-schema.schema-version="1.0" | |
WORKDIR /usr/src/api | |
ADD strapi-app /usr/src/api/strapi-app | |
RUN apt-get update | |
RUN apt-get -y install curl gnupg build-essential | |
RUN curl -sL https://deb.nodesource.com/setup_11.x | bash - | |
RUN apt-get -y install nodejs | |
RUN npm install -g strapi@beta --unsafe-perm=true --allow-root | |
RUN npm install --prefix ./strapi-app install ./strapi-app && npm install --prefix ./strapi-app install mysql --save ./strapi-app && NODE_ENV=production npm run --prefix ./strapi-app build | |
RUN strapi -v | |
COPY strapi.sh ./ | |
RUN chmod +x ./strapi.sh | |
EXPOSE 1337 | |
COPY healthcheck.js ./ | |
HEALTHCHECK --interval=15s --timeout=5s --start-period=30s \ | |
CMD node /usr/src/api/healthcheck.js | |
CMD ["./strapi.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment