Giter Club home page Giter Club logo

strapi-docker's Introduction

๐Ÿš€ Strapi (v4) - Docker

Static Badge Docker 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

App Keys (Optional) - You set it up when you created the container.

If you would like to change these variables for the keys.

  • APP_KEYS = "key1,key2,key3,key4" It is preferable to place four random keys, preferably consisting of 24 numbers and letters.

  • ADMIN_JWT_SECRET = "key" It is preferred to include 24 random numbers and letters.

  • API_TOKEN_SALT = "key" It is preferred to include 24 random numbers and letters.

  • TRANSFER_TOKEN_SALT = "key" It is preferred to include 24 random numbers and letters.

  • JWT_SECRET = "key" It is preferred to include 32 random numbers and letters.

๐Ÿ“š Official Documentation


This project is a personal effort and is not affiliated with any company โค๏ธ.

strapi-docker's People

Contributors

osama-altamimi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.