Quick Start with Docker
Get started with EverShop in minutes using the official Docker image:http://localhost:3000.
Docker Compose Setup
Basic Configuration
Here’s the completedocker-compose.yml for EverShop:
Step-by-Step Deployment
Create docker-compose.yml
Create a new directory for your EverShop deployment and add the Paste the Docker Compose configuration above.
docker-compose.yml file:Configure Environment Variables
Create a Update
.env file for sensitive credentials:docker-compose.yml to use environment variables:Start the Services
Launch EverShop and PostgreSQL:Check the logs to ensure everything started correctly:
Wait for Initialization
The first startup takes a few minutes as EverShop:
- Installs dependencies
- Builds the application
- Initializes the database
Access Your Store
Once initialized, access:
- Storefront:
http://localhost:3000 - Admin panel:
http://localhost:3000/admin
- Email:
[email protected] - Password:
123456
Production Configuration
Enhanced docker-compose.yml
For production, enhance your configuration with health checks, resource limits, and better security:Custom Dockerfile
If you need to customize the Docker image, here’s the base Dockerfile:Building Custom Image
Persistence and Volumes
Data Volumes
EverShop requires persistent storage for:- Database - PostgreSQL data
- Media files - Product images and uploads
- Public assets - Built static files
Backup Volumes
Networking
Reverse Proxy with Nginx
For production, use Nginx as a reverse proxy:Environment-Specific Deployments
Development
Staging
Production
Common Docker Commands
Troubleshooting
Container Won’t Start
Check logs for errors:- Port 3000 already in use
- Database connection failed
- Missing environment variables
Database Connection Issues
Verify database is healthy:Permission Issues
Fix volume permissions:Out of Memory
Increase memory limits indocker-compose.yml:
Best Practices
Use Specific Versions
Pin to specific image versions in production, not
latestHealth Checks
Always configure health checks for automatic container recovery
Resource Limits
Set CPU and memory limits to prevent resource exhaustion
Persistent Volumes
Always use named volumes for database and media files