/strapi-docker-starter

Run Strapi 4 in a Docker Container Using Docker Compose

Primary LanguageJavaScript

strapi-docker-starter

A Strapi 4 template project using PostgreSQL with Docker and Docker Compose support

This repository is associated with a blog post, for more details please head to the post from here.

Development deployment

  1. Install npm dependencies (run command in app directory)

    npm i
  2. Launch development database

    docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d db
  3. Run Strapi in development mode

    npm run develop
  4. Shutdown development database (optional)

    docker-compose -f docker-compose.yml -f docker-compose.dev.yml down

Production deployment

  1. Build Strapi admin panel (run command in app directory)

    npm run build
  2. Run with Docker Compose (run in repository root directory)

    docker-compose up -d --build

Consider buying us a coffee ❤️

Buy Us A Coffee