A production-ready Docker Strapi image with full Azure cloud integration.
Strapi is a leading open-source headless CMS that gives developers the freedom to use their favorite tools and frameworks while providing editors with an easy-to-use interface to manage content.
Key Strapi features:
- Content Management - Intuitive admin panel for content creators
- REST & GraphQL APIs - Automatically generated APIs
- Customizable - Fully customizable with plugins and custom code
- Multi-database support - Works with PostgreSQL, MySQL, MariaDB, and SQLite
- Role-based permissions - Fine-grained access control
- Internationalization - Built-in i18n support
This Docker image is specifically designed for Azure-first organizations who want to leverage the full power of Microsoft's cloud ecosystem with Strapi.
Target audience:
- Azure cloud architects and DevOps teams
- Organizations with existing Azure infrastructure
- Teams requiring enterprise-grade storage and CDN solutions
- Developers building scalable content management solutions
✅ Azure Blob Storage - Native media storage integration (strapi media) ✅ Azure Database - Support for Azure SQL, PostgreSQL, MySQL (strapi database) ✅ Azure Container Registry - Optimized for ACR deployment (image hosting in ACR or docker hub) ✅ Azure Front Door CDN - Built-in CDN configuration for media files (to provide media files through de custom CDN) ✅ Azure File Shares - Application data persistence (strapi data schemas, might be synchronised accross your env stages) ✅ Azure App Container Instances - Ready for ACI or ACA deployment (main strapi web instance)
- Docker installed on your machine
- Azure subscription (for full Azure integration)
-
Clone this repository:
git clone https://github.com/Evodim/strapi-azure-docker.git cd strapi-azure-docker -
Create your environment file:
cp .env.example .env
-
Configure your Azure services in
.env:# Database Configuration DATABASE_CLIENT=postgres DATABASE_HOST=your-azure-db-host DATABASE_NAME=strapi DATABASE_USERNAME=your-username DATABASE_PASSWORD=your-password # Azure Storage Configuration STORAGE_ACCOUNT=your-storage-account STORAGE_ACCOUNT_KEY=your-account-key STORAGE_CONTAINER_NAME=strapi-uploads STORAGE_CDN_URL=https://your-cdn-endpoint
-
Start your Strapi instance:
docker-compose up -d
-
Access your Strapi admin: Open
http://localhost:1337/adminand create your first admin user.
Pull the latest image from Docker Hub:
docker pull evodim/strapi-azure:latestHere's a complete docker-compose.yml example for running Strapi with Azure integration:
version: "3.8"
services:
strapi:
container_name: strapi-azure
image: evodim/strapi-azure:latest
# For development mode, uncomment the line below to override the default command
# This will start Strapi in development mode with hot reloading
# command: ["yarn", "develop"]
ports:
- "1337:1337"
environment:
# Database Configuration
- DATABASE_CLIENT=postgres
- DATABASE_HOST=your-azure-db-host.postgres.database.azure.com
- DATABASE_PORT=5432
- DATABASE_NAME=strapi
- DATABASE_USERNAME=your-username
- DATABASE_PASSWORD=your-password
- DATABASE_SSL=true
# Azure Storage Configuration
- STORAGE_ACCOUNT=yourstorageaccount
- STORAGE_ACCOUNT_KEY=your-storage-account-key
- STORAGE_URL=https://yourstorageaccount.blob.core.windows.net
- STORAGE_CONTAINER_NAME=strapi-uploads
- STORAGE_CDN_URL=https://your-cdn-endpoint.azureedge.net
- STORAGE_DEFAULT_PATH=uploads
- STORAGE_MAX_CONCURRENT=10
# Strapi Configuration
- NODE_ENV=production
- ADMIN_JWT_SECRET=your-admin-jwt-secret
- API_TOKEN_SALT=your-api-token-salt
- APP_KEYS=your-app-key1,your-app-key2,your-app-key3,your-app-key4
- JWT_SECRET=your-jwt-secret
- TRANSFER_TOKEN_SALT=your-transfer-token-salt
- ALLOWED_HOSTS=admin-portal-host.uri.fr
- STRAPI_TRANSFER_TOKEN=${STRAPI_TRANSFER_TOKEN} # New environment variable for distant Strapi transfer token
- STRAPI_TRANSFER_URL=${STRAPI_TRANSFER_URL} # New environment variable for distant Strapi transfer URL
- STRAPI_ENABLE_REMOTE_DATA_TRANSFER=${STRAPI_ENABLE_REMOTE_DATA_TRANSFER} # New environment variable to enable remote data transfer
volumes:
# Mount your application source code for development
# Uncomment the line below for development mode
- you_strapi_content_data:/srv/app
restart: unless-stopped
# Health check to ensure Strapi is running
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:1337/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
strapi_data:For Production (default):
- Uses
yarn startcommand (production mode) - No volume mounting of source code
NODE_ENV=production
For Development:
- Uncomment
command: ["yarn", "develop"]to enable hot reloading - Uncomment the volume mount
./app:/srv/app/srcto edit code locally - Change
NODE_ENV=development
You can customize the Docker image build process using build arguments (--build-arg). This allows you to control the base image and environment configuration.
| Argument | Default Value | Description |
|---|---|---|
BASE_IMAGE |
node |
Base Docker image (e.g., node, arm64v8/node for ARM architecture) |
NODE_VERSION |
22-alpine |
Node.js version and variant for the base image |
NODE_ENV |
production |
Node.js environment mode (production/development) |
Build for ARM64 architecture with custom Node version:
# Custom ARM64 build (as shown in your last build)
docker build . \
--build-arg BASE_IMAGE=arm64v8/node \
-t evodim/strapi-azure:v2.5.30-armBuild for standard AMD64 architecture:
# Standard x86_64/AMD64 build
docker build . \
--build-arg BASE_IMAGE=node \
-t evodim/strapi-azure:v2.5.30Tip: Combine BASE_IMAGE and NODE_VERSION to target specific architectures and Node.js versions for your deployment needs.
Here's a complete Azure setup example for hosting Strapi in production:
- Azure Container Registry - Store your Strapi image
- Azure Database for PostgreSQL - Managed database service
- Azure Storage Account - Blob storage for media files
- Azure Front Door - Global CDN and load balancing
- Azure Container Instances - Host your Strapi application
- Azure File Share - Persistent application data
┌─────────────────────┐ ┌──────────────────────┐
│ Azure Front Door │────│ Azure App Container │
│ (CDN + SSL) │ │ Instance (Strapi) │
└─────────────────────┘ └──────────────────────┘
│
┌──────────┼──────────┐
│ │ │
┌──────────▼─┐ ┌──────▼─────┐ ┌──▼────────┐
│ Azure DB │ │Azure Blob │ │Azure File │
│PostgreSQL │ │Storage │ │Share │
└────────────┘ └────────────┘ └───────────┘
This image follows a structured versioning strategy to ensure compatibility and easy tracking of Strapi updates.
Format: v2[strapi-major].[minor-version]
- v2 - Image major version (indicates significant image architecture changes)
- [strapi-major] - Major version of Strapi (e.g., 4, 5, 6)
- [minor-version] - Our incremental updates and patches based on provided strapi version
| Image Version | Strapi Version | Description |
|---|---|---|
v2.5.28 |
Strapi 5.x | Image v2 with Strapi 5, build 28 |
v2.5.30 |
Strapi 5.x | Image v2 with Strapi 5, build 30 |
v2.5.30 |
Strapi 5.x | Image v2 with Strapi 5, build 30 |
latest- Always points to the most recent stable releasev2.5.28- Specific version for production deploymentspreview- Preview version, pre release
🔄 Regular Updates (Minor versions)
- Bug fixes and optimizations
- Azure service improvements
- Security patches
- Dependencies updates
🚀 Major Updates (Strapi major versions)
- New Strapi major version support
- Breaking changes in Strapi API
- Significant feature additions
For Production:
# Use specific version tags for stability
docker pull evodim/strapi-azure:v2.5.28For Development:
# Use latest for newest features
docker pull evodim/strapi-azure:vX.X.XX-previewWe welcome your feedback and contributions!
- Issues: Report bugs or request features on GitHub Issues
- Contributions: Submit pull requests to improve the image
MIT License - see LICENSE file for details.
Made with ❤️ for the Azure community