- Update docker-compose.yml to use postgres:18 - Update docker-compose.production.yml to use postgres:18-alpine - Update Sail Dockerfile to install postgresql-client-18 - Fix SuperAdminSeeder to use correct role name (super_admin) - Fix DevSeeder to use status field instead of deprecated approval_status - Database rebuilt with fresh PostgreSQL 18 installation - All 95 migrations running successfully on PostgreSQL 18 - All seeders working correctly PostgreSQL 18 benefits: - Improved query performance and optimization - Enhanced logical replication - Better partition management - Improved connection pooling - Enhanced JSON processing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
118 lines
3.0 KiB
YAML
118 lines
3.0 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# ==================== Application ====================
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: cannabrands/app:latest
|
|
container_name: cannabrands-app
|
|
restart: unless-stopped
|
|
working_dir: /var/www/html
|
|
volumes:
|
|
- ./storage:/var/www/html/storage
|
|
- ./bootstrap/cache:/var/www/html/bootstrap/cache
|
|
networks:
|
|
- cannabrands
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
environment:
|
|
- APP_ENV=${APP_ENV:-production}
|
|
- APP_DEBUG=${APP_DEBUG:-false}
|
|
- APP_URL=${APP_URL}
|
|
- DB_CONNECTION=pgsql
|
|
- DB_HOST=postgres
|
|
- DB_PORT=5432
|
|
- DB_DATABASE=${DB_DATABASE}
|
|
- DB_USERNAME=${DB_USERNAME}
|
|
- DB_PASSWORD=${DB_PASSWORD}
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
- MAIL_HOST=${MAIL_HOST:-mailpit}
|
|
- MAIL_PORT=${MAIL_PORT:-1025}
|
|
- CACHE_DRIVER=redis
|
|
- SESSION_DRIVER=redis
|
|
- QUEUE_CONNECTION=redis
|
|
ports:
|
|
- "${APP_PORT:-80}:80"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# ==================== PostgreSQL Database ====================
|
|
postgres:
|
|
image: postgres:18-alpine
|
|
container_name: cannabrands-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${DB_DATABASE:-cannabrands_app}
|
|
POSTGRES_USER: ${DB_USERNAME:-sail}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-password}
|
|
PGDATA: /var/lib/postgresql/data/pgdata
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
networks:
|
|
- cannabrands
|
|
ports:
|
|
- "${DB_PORT:-5432}:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME:-sail}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# ==================== Redis Cache ====================
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: cannabrands-redis
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly yes --requirepass "${REDIS_PASSWORD:-}"
|
|
volumes:
|
|
- redis-data:/data
|
|
networks:
|
|
- cannabrands
|
|
ports:
|
|
- "${REDIS_PORT:-6379}:6379"
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# ==================== Mailpit (Email Testing) ====================
|
|
mailpit:
|
|
image: axllent/mailpit:latest
|
|
container_name: cannabrands-mailpit
|
|
restart: unless-stopped
|
|
networks:
|
|
- cannabrands
|
|
ports:
|
|
- "${MAILPIT_SMTP_PORT:-1025}:1025"
|
|
- "${MAILPIT_UI_PORT:-8025}:8025"
|
|
environment:
|
|
MP_MAX_MESSAGES: 5000
|
|
MP_DATABASE: /data/mailpit.db
|
|
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
|
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
|
volumes:
|
|
- mailpit-data:/data
|
|
|
|
# ==================== Networks ====================
|
|
networks:
|
|
cannabrands:
|
|
driver: bridge
|
|
|
|
# ==================== Volumes ====================
|
|
volumes:
|
|
postgres-data:
|
|
driver: local
|
|
redis-data:
|
|
driver: local
|
|
mailpit-data:
|
|
driver: local
|