Deployment Guide¶
This guide covers deploying the Freeze Design webshop to production.
Infrastructure Requirements¶
Minimum Specifications¶
| Component | Specification |
|---|---|
| CPU | 2 vCPU |
| RAM | 4 GB |
| Storage | 50 GB SSD |
| OS | Ubuntu 22.04 LTS |
Services Required¶
- PostgreSQL 15+
- Redis 7+
- RabbitMQ 3.12+
- Nginx (reverse proxy)
- Docker (optional)
Docker Deployment¶
Build Images¶
# Backend
docker build -t freezedesign/backend:latest ./backend
# Frontend
docker build -t freezedesign/frontend:latest ./frontend
Docker Compose¶
# docker-compose.prod.yml
version: '3.8'
services:
backend:
image: freezedesign/backend:latest
environment:
- DEBUG=False
- SECRET_KEY=${SECRET_KEY}
- DB_HOST=postgres
depends_on:
- postgres
- redis
frontend:
image: freezedesign/frontend:latest
environment:
- NEXT_PUBLIC_API_URL=https://api.freezedesign.nl
postgres:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
Environment Variables¶
Production Backend¶
DEBUG=False
SECRET_KEY=<generate-secure-key>
ALLOWED_HOSTS=api.freezedesign.nl
DB_NAME=freezedesign
DB_USER=freezedesign
DB_PASSWORD=<secure-password>
DB_HOST=postgres
SECURE_SSL_REDIRECT=True
Production Frontend¶
SSL Configuration¶
Use Let's Encrypt with Certbot:
Database Migrations¶
Static Files¶
Health Checks¶
Verify deployment:
# Backend health
curl https://api.freezedesign.nl/api/health/
# Frontend
curl https://www.freezedesign.nl/
Rollback Procedure¶
- Identify the last working version
- Pull the previous image tag
- Restart services
- Verify functionality