mirror of
https://github.com/thecyberlearn/quantumtaskai-caprover.git
synced 2026-08-18 07:52:55 +00:00
Add Dokploy deployment configuration
- Add dokploy.json configuration file - Create Dockerfile.dokploy optimized for port 3000 - Add environment variables template for Dokploy - Update Django settings for Dokploy auto-detection 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
9261d73d4f
commit
ce841c7ec1
24
.env.dokploy.example
Normal file
24
.env.dokploy.example
Normal file
@ -0,0 +1,24 @@
|
||||
# Required Environment Variables for Dokploy Deployment
|
||||
|
||||
# Django Core
|
||||
SECRET_KEY=your-secret-key-here-generate-a-new-one
|
||||
DEBUG=false
|
||||
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com
|
||||
|
||||
# Database (PostgreSQL recommended for production)
|
||||
DATABASE_URL=postgres://username:password@hostname:5432/database_name
|
||||
|
||||
# Optional - Email Configuration
|
||||
EMAIL_HOST_USER=your-email@gmail.com
|
||||
EMAIL_HOST_PASSWORD=your-app-password
|
||||
|
||||
# Optional - Stripe Payments
|
||||
STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key
|
||||
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
|
||||
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
|
||||
|
||||
# Optional - Static Files (for custom S3/CDN)
|
||||
# AWS_ACCESS_KEY_ID=your-aws-access-key
|
||||
# AWS_SECRET_ACCESS_KEY=your-aws-secret-key
|
||||
# AWS_STORAGE_BUCKET_NAME=your-bucket-name
|
||||
# AWS_S3_REGION_NAME=us-east-1
|
||||
29
Dockerfile.dokploy
Normal file
29
Dockerfile.dokploy
Normal file
@ -0,0 +1,29 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
libpq-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy and install Python dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
SECRET_KEY="build-time-dummy-key-change-in-production"
|
||||
|
||||
# Collect static files
|
||||
RUN python manage.py collectstatic --noinput
|
||||
|
||||
# Expose port 3000 for Dokploy
|
||||
EXPOSE 3000
|
||||
|
||||
# Start gunicorn on port 3000
|
||||
CMD ["gunicorn", "netcop_hub.wsgi:application", "--bind", "0.0.0.0:3000"]
|
||||
10
dokploy.json
Normal file
10
dokploy.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "quantum-tasks-ai",
|
||||
"type": "dockerfile",
|
||||
"dockerfile": "./Dockerfile.dokploy",
|
||||
"port": 3000,
|
||||
"buildArgs": {},
|
||||
"env": {
|
||||
"PYTHONUNBUFFERED": "1"
|
||||
}
|
||||
}
|
||||
@ -60,6 +60,10 @@ ALLOWED_HOSTS = config('ALLOWED_HOSTS', default='localhost,127.0.0.1,testserver,
|
||||
if config('CAPROVER_GIT_COMMIT_SHA', default=''):
|
||||
ALLOWED_HOSTS = ['*'] # Allow all hosts in CapRover environment
|
||||
|
||||
# Dokploy auto-detection
|
||||
if config('DOKPLOY_PROJECT_NAME', default=''):
|
||||
ALLOWED_HOSTS = ['*'] # Allow all hosts in Dokploy environment
|
||||
|
||||
# Site URL configuration for emails
|
||||
if config('RAILWAY_ENVIRONMENT', default=''):
|
||||
# Use production domain for email verification links
|
||||
|
||||
Loading…
Reference in New Issue
Block a user