Skip to content

Instantly share code, notes, and snippets.

@guushamann
Last active December 29, 2022 05:26
Show Gist options
  • Save guushamann/6fec5c073e2edb6579e8060e7e7f3bd9 to your computer and use it in GitHub Desktop.
Save guushamann/6fec5c073e2edb6579e8060e7e7f3bd9 to your computer and use it in GitHub Desktop.
version: '3'
services:
api:
environment:
- APP_NAME=strapi-app
- DATABASE_CLIENT=mongo
- DATABASE_HOST=db
- DATABASE_PORT=27017
- DATABASE_NAME=strapi
- DATABASE_USERNAME=
- DATABASE_PASSWORD=
- HOST=localhost
ports:
- 1337:1337
volumes:
- ./strapi-app:/usr/src/api/strapi-app
#- /usr/src/api/strapi-app/node_modules
build: .
depends_on:
- db
restart: always
db:
image: andresvidal/rpi3-mongodb3
environment:
- MONGO_INITDB_DATABASE=strapi
ports:
- 27017:27017
volumes:
- ./db:/data/db
restart: always
FROM node:10
LABEL maintainer="Luca Perret <perret.luca@gmail.com>" \
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
RUN npm install -g strapi@3.0.0-alpha.14.1
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