Get BareCMS up and running quickly with Docker. This guide provides step-by-step instructions for both quick deployment and local development.
For Quick Deployment:
For Local Development:
mkdir barecms-app && cd barecms-appCreate .env file:
# Security (REQUIRED)
JWT_SECRET=your-super-secret-jwt-key-here
# Database Configuration
POSTGRES_USER=barecms_user
POSTGRES_PASSWORD=your-secure-password
POSTGRES_DB=barecms_db
DATABASE_URL=postgresql://barecms_user:your-secure-password@postgres:5432/barecms_db
# Application
PORT=8080Create a docker-compose.yml file:
services:
postgres:
image: postgres:16-alpine
env_file: .env
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
barecms:
image: ghcr.io/snowztech/barecms:latest
ports:
- "${PORT:-8080}:8080"
env_file: .env
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
volumes:
postgres_data:docker-compose up -d🎉 BareCMS is now running at http://localhost:8080
git clone https://github.com/snowztech/barecms.git
cd barecmscp .env.example .envEdit .env and update the JWT_SECRET with a strong, random string:
# Generate a secure JWT secret
openssl rand -base64 32make upOpen your browser and navigate to http://localhost:8080
make up # Start development environment
make ui # Build UI (frontend)
make clean # Stop and cleanup containers
make logs # View application logs
make help # Show all available commands# View logs
docker compose logs -f barecms
# Stop BareCMS
docker compose down
# Update to latest version
docker compose pull && docker compose up -d
# Backup database
docker compose exec postgres pg_dump -U barecms_user barecms_db > backup.sql
# Access database shell
docker compose exec postgres psql -U barecms_user -d barecms_dbGenerate a secure JWT secret:
openssl rand -base64 32Make sure to use this generated value for JWT_SECRET in your .env file.
- Create your first site and collection through the admin interface
- Check out the Quick Example to see how to access your data
- Review the API Reference for complete documentation
- 🐛 Report Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions