Tldr

To build for dev, run: docker-compose -f docker-compose.dev.yml up --build

To build for prod, run: docker-compose -f docker-compose.prod.yml up --build


Project generated via: https://github.com/strapi-community/strapi-tool-dockerize

nginx reverse proxy to strapi: https://docs.strapi.io/dev-docs/deployment/nginx-proxy

Exporting & Importing data to/from Strapi local vs. remote

These are the required keys. Many are generated by the strapi npx CLI tool ("someKeyFromRandomKeyGenerator")..= The various values for name, pw, secret, key, salt can be customized. "host" is the strapi host. database_host is the database host.

DATABASE_CLIENT=postgres
DATABASE_HOST=localhost
DATABASE_NAME=strapi
DATABASE_USERNAME=strapi
DATABASE_PASSWORD=someGoodPassword
DATABASE_PORT=5432
JWT_SECRET=someKeyFromRandomKeyGenerator
ADMIN_JWT_SECRET=someKeyFromRandomKeyGenerator
NODE_ENV=development

# has to be 0.0.0.0 to be reached by laptop running locally
HOST=0.0.0.0
# HOST=localhost
PORT=1337
APP_KEYS=someKeyFromRandomKeyGenerator1,someKeyFromRandomKeyGenerator2,someKeyFromRandomKeyGenerator3,someKeyFromRandomKeyGenerator4
API_TOKEN_SALT=someKeyFromRandomKeyGenerator
TRANSFER_TOKEN_SALT=someKeyFromRandomKeyGenerator

Below: Original strapi readme

🚀 Getting started with Strapi

Strapi comes with a full featured Command Line Interface (CLI) which lets you scaffold and manage your project in seconds.

develop

Start your Strapi application with autoReload enabled. Learn more

npm run develop
# or
yarn develop

start

Start your Strapi application with autoReload disabled. Learn more

npm run start
# or
yarn start

build

Build your admin panel. Learn more

npm run build
# or
yarn build

⚙️ Deployment

Strapi gives you many possible deployment options for your project including Strapi Cloud. Browse the deployment section of the documentation to find the best solution for your use case.

📚 Learn more

  • Resource center - Strapi resource center.
  • Strapi documentation - Official Strapi documentation.
  • Strapi tutorials - List of tutorials made by the core team and the community.
  • Strapi blog - Official Strapi blog containing articles made by the Strapi team and the community.
  • Changelog - Find out about the Strapi product updates, new features and general improvements.

Feel free to check out the Strapi GitHub repository. Your feedback and contributions are welcome!

✨ Community

  • Discord - Come chat with the Strapi community including the core team.
  • Forum - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
  • Awesome Strapi - A curated list of awesome things related to Strapi.

🤫 Psst! Strapi is hiring.