Some checks failed
System Monitoring / Health Checks (push) Has been cancelled
System Monitoring / Performance Monitoring (push) Has been cancelled
System Monitoring / Database Monitoring (push) Has been cancelled
System Monitoring / Cache Monitoring (push) Has been cancelled
System Monitoring / Log Monitoring (push) Has been cancelled
System Monitoring / Resource Monitoring (push) Has been cancelled
System Monitoring / Uptime Monitoring (push) Has been cancelled
System Monitoring / Backup Monitoring (push) Has been cancelled
System Monitoring / Security Monitoring (push) Has been cancelled
System Monitoring / Monitoring Dashboard (push) Has been cancelled
System Monitoring / Alerting (push) Has been cancelled
Security Scanning / Dependency Scanning (push) Has been cancelled
Security Scanning / Code Security Scanning (push) Has been cancelled
Security Scanning / Secrets Scanning (push) Has been cancelled
Security Scanning / Container Security Scanning (push) Has been cancelled
Security Scanning / Compliance Checking (push) Has been cancelled
Security Scanning / Security Dashboard (push) Has been cancelled
Security Scanning / Security Remediation (push) Has been cancelled
125 lines
2.6 KiB
YAML
125 lines
2.6 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# PostgreSQL Database
|
|
postgres:
|
|
image: postgres:14
|
|
environment:
|
|
POSTGRES_DB: saas_platform
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: devpass
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./docker/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
|
|
ports:
|
|
- "5432:5432"
|
|
networks:
|
|
- saas-network
|
|
|
|
# Redis Cache
|
|
redis:
|
|
image: redis:7-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- saas-network
|
|
|
|
# Backend Django API
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
- DEBUG=True
|
|
- DB_HOST=postgres
|
|
- DB_NAME=saas_platform
|
|
- DB_USER=postgres
|
|
- DB_PASSWORD=devpass
|
|
- REDIS_URL=redis://redis:6379/0
|
|
- SECRET_KEY=django-insecure-key-for-development
|
|
- ALLOWED_HOSTS=localhost,backend
|
|
volumes:
|
|
- ./backend:/app
|
|
- ./shared:/shared
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
networks:
|
|
- saas-network
|
|
command: python manage.py runserver 0.0.0.0:8000
|
|
|
|
# Frontend Next.js
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
- NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1
|
|
- NEXT_PUBLIC_APP_URL=http://localhost:3000
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
- /app/.next
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- saas-network
|
|
command: npm run dev
|
|
|
|
# Celery Worker
|
|
celery:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
- DEBUG=True
|
|
- DB_HOST=postgres
|
|
- DB_NAME=saas_platform
|
|
- DB_USER=postgres
|
|
- DB_PASSWORD=devpass
|
|
- REDIS_URL=redis://redis:6379/0
|
|
- SECRET_KEY=django-insecure-key-for-development
|
|
volumes:
|
|
- ./backend:/app
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
networks:
|
|
- saas-network
|
|
command: celery -A core worker --loglevel=info
|
|
|
|
# Celery Beat (Scheduled Tasks)
|
|
celery-beat:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
- DEBUG=True
|
|
- DB_HOST=postgres
|
|
- DB_NAME=saas_platform
|
|
- DB_USER=postgres
|
|
- DB_PASSWORD=devpass
|
|
- REDIS_URL=redis://redis:6379/0
|
|
- SECRET_KEY=django-insecure-key-for-development
|
|
volumes:
|
|
- ./backend:/app
|
|
depends_on:
|
|
- postgres
|
|
- redis
|
|
networks:
|
|
- saas-network
|
|
command: celery -A core beat --loglevel=info
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
|
|
networks:
|
|
saas-network:
|
|
driver: bridge |