Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 65 additions & 41 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,47 +1,71 @@
DEBUG=False
# Core Django settings
# Use "development" for local work. Production/staging deployments should override this.
ENVIRONMENT=development
SECRET_KEY=your-secret-key-here
DATABASE_URL=sqlite:///db.sqlite3
EMAIL_FROM=admin@example.com
SENDGRID_API_KEY=your-sendgrid-api-key
SENDGRID_PASSWORD=your-sendgrid-password
SLACK_WEBHOOK_URL=your-slack-webhook-url

# Replace this in shared or deployed environments.
SECRET_KEY=django-insecure-change-me

# Must be a valid Fernet key. Generate one with: python web/master_key.py
MESSAGE_ENCRYPTION_KEY=5ezrkqK2lhifqBRt9f8_dZhFQF_f5ipSQDV8Vzv9Dek=
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.env.sample currently ships a concrete MESSAGE_ENCRYPTION_KEY value. Because this key protects encrypted messaging data, providing a real (valid) key in-repo increases the risk that someone deploys with the sample key unchanged. Safer pattern is to leave it blank (or set an obvious placeholder) and document generating a per-environment key (settings.py already has a default generator).

Suggested change
MESSAGE_ENCRYPTION_KEY=5ezrkqK2lhifqBRt9f8_dZhFQF_f5ipSQDV8Vzv9Dek=
MESSAGE_ENCRYPTION_KEY=

Copilot uses AI. Check for mistakes.
# Generate a key by running: python web/master_key.py

# Stripe Configuration
STRIPE_PUBLISHABLE_KEY=your-stripe-publishable-key
STRIPE_SECRET_KEY=your-stripe-secret-key
STRIPE_WEBHOOK_SECRET=your-stripe-webhook-secret
DJANGO_DEBUG=True
# Comma-separated hostnames/origins used by Django security checks.
ALLOWED_HOSTS=127.0.0.1,localhost
CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8000,http://localhost:8000

# Admin Configuration
# The admin is mounted at /en/<ADMIN_URL>/.
ADMIN_URL=a-dmin-url123

# Google Cloud Storage Configuration
GS_BUCKET_NAME=your-bucket-name
GS_PROJECT_ID=your-project-id
SERVICE_ACCOUNT_FILE=your-service-account-file-path

#Twitter Configuration
TWITTER_API_KEY=your_api_key_here
TWITTER_API_SECRET_KEY=your_api_secret_here
TWITTER_ACCESS_TOKEN=your_access_token_here
TWITTER_ACCESS_TOKEN_SECRET=your_access_token_secret_here

#Deployment Configuration
APP_PORT=8000
DOMAIN_NAME=yourdomain.com
ENABLE_HTTPS_REDIRECT=True
PROJECT_NAME=education-website
PYTHON_VERSION=3.11
VPS_IP=your-vps-ip
VPS_PASSWORD=your-vps-password
VPS_USER=root
DB_NAME=education_website
DB_USER=root
DB_PASSWORD=your_secure_database_password
GIT_REPO=your_git_repo_to_deploy
GIT_BRANCH=your_repo_branch
ALLOWED_HOSTS=example.com,www.example.com,127.0.0.1,localhost
CSRF_TRUSTED_ORIGINS=http://domain.com
# Local services
# Keep the SQLite value for the simplest local setup.
DATABASE_URL=sqlite:///db.sqlite3
REDIS_URL=redis://127.0.0.1:6379/0
MEDIA_ROOT=media
CACHE_MIDDLEWARE_SECONDS=300
CACHE_MIDDLEWARE_KEY_PREFIX=aol
CSRF_COOKIE_SECURE=False
SESSION_COOKIE_SECURE=False

# Email and notifications
EMAIL_FROM=noreply@example.com
SLACK_WEBHOOK_URL=
EMAIL_SLACK_WEBHOOK=
MAILGUN_SENDING_KEY=
MAILGUN_DOMAIN=

# Legacy system status check; only needed if you still use SendGrid.
SENDGRID_PASSWORD=

# Billing
STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=

# Monitoring
SENTRY_DSN=
SENTRY_LOG_LEVEL=INFO
SENTRY_TRACES_SAMPLE_RATE=0.0

# Content and social integrations
MAILCHIMP_API_KEY=
MAILCHIMP_LIST_ID=
INSTAGRAM_ACCESS_TOKEN=
FACEBOOK_ACCESS_TOKEN=
TWITTER_USERNAME=alphaonelabs
TWITTER_API_KEY=
TWITTER_API_SECRET_KEY=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_TOKEN_SECRET=
YOUTUBE_API_KEY=
YOUTUBE_CHANNEL_ID=

# GitHub integrations
GITHUB_ACCESS_TOKEN=
GITHUB_TOKEN=
GITHUB_REPO=AlphaOneLabs/education-website
GITHUB_WEBHOOK_SECRET=

# Google Cloud Storage
# Leave these blank unless you are testing cloud media storage.
GS_BUCKET_NAME=
GS_PROJECT_ID=
SERVICE_ACCOUNT_FILE=google_credentials.json
11 changes: 6 additions & 5 deletions .github/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ setup_steps:
name: "Run Development Server"
description: "Start the Django development server"
commands:
- "python manage.py runserver"
- "poetry run uvicorn web.asgi:application --host 127.0.0.1 --port 8000 --reload"
notes:
- "Server runs at http://localhost:8000"
- "Admin panel available at http://localhost:8000/admin"
- "Server runs at http://127.0.0.1:8000/en/"
- "Use Uvicorn for local WebSocket support"
- "Admin panel path is controlled by ADMIN_URL in .env"
Comment on lines 127 to +134
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step’s description says “Start the Django development server”, but the command now starts Uvicorn (ASGI). Please update the name/description to reflect that this is an ASGI/Uvicorn startup step to avoid confusion when following the setup guide.

Copilot uses AI. Check for mistakes.
- "Press Ctrl+C to stop the server"

docker_setup:
Expand Down Expand Up @@ -211,7 +212,7 @@ tech_stack:
- "Nginx"
- "Uvicorn (ASGI)"
- "Django Channels (WebSockets)"
- "SendGrid for emails"
- "Mailgun with Slack notification fallback"
- "Stripe for payments"

important_notes:
Expand All @@ -225,7 +226,7 @@ important_notes:

useful_commands:
development:
run_server: "python manage.py runserver"
run_server: "poetry run uvicorn web.asgi:application --host 127.0.0.1 --port 8000 --reload"
make_migrations: "python manage.py makemigrations"
migrate: "python manage.py migrate"
create_superuser: "python manage.py createsuperuser"
Expand Down
Loading
Loading