osama144/strapi

By osama144

Updated 8 months ago

This is Docker container for Strapi (v4)

Image
API Management
Content Management System
Databases & Storage
0

62

🚀 Strapi (v4) - Docker

Static BadgeDocker Image Version (tag)Docker Pulls

This is Docker container for Strapi (v4)

Example


Using Docker Compose, create docker-compose.yml file with the following content:

You can find more example on GitHub.

version: "3.9"
services:
  strapi:
    image: osama144/strapi:latest # or ghcr.io/osama-altamimi/strapi:latest
    container_name: Strapi
    restart: on-failure:5
    ports:
      - 1337:1337
    environment:
      NODE_ENV: development # or production

How to use ?


This image allows you to create a new Strapi project.

  • for NODE_ENV = development: The command that will run in your project is strapi develop.
  • for NODE_ENV = production: The command that will run in your project is strapi start.

The Content-Type Builder plugin is disabled WHEN NODE_ENV = production.

⚙️ Creating a new strapi project


Environment Variables

  • NODE_ENV The command that will run in your project. | Default > development

  • DATABASE_CLIENT The database client to use, supported by Strapi: (sqlite, postgres, mysql). | Default > sqlite

  • DATABASE_HOST The database host.

  • DATABASE_PORT The database port.

  • DATABASE_NAME The database name.

  • DATABASE_USERNAME The database username.

  • DATABASE_PASSWORD The database password.

  • DATABASE_SSL Boolean for SSL. | Default > false

📚 Official Documentation



This project is a personal effort and is not affiliated with any company ❤️.

Docker Pull Command

docker pull osama144/strapi