batman (working version kinda)
This commit is contained in:
commit
6dd38036e7
65 changed files with 3950 additions and 0 deletions
47
scripts/setup.sh
Normal file
47
scripts/setup.sh
Normal file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Setup script for Docker deployment
|
||||
|
||||
# Create SSL certificates for NGINX
|
||||
mkdir -p config/nginx/ssl
|
||||
|
||||
if [ ! -f config/nginx/ssl/server.crt ]; then
|
||||
echo "Generating self-signed SSL certificates..."
|
||||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
|
||||
-keyout config/nginx/ssl/server.key \
|
||||
-out config/nginx/ssl/server.crt \
|
||||
-subj "/C=US/ST=State/L=City/O=Organization/CN=localhost"
|
||||
fi
|
||||
|
||||
# Create empty .env file if it doesn't exist
|
||||
if [ ! -f .env ]; then
|
||||
echo "Creating .env file with default values..."
|
||||
cat > .env << EOF
|
||||
# Flask application settings
|
||||
FLASK_APP=app
|
||||
FLASK_ENV=production
|
||||
SECRET_KEY=$(openssl rand -hex 24)
|
||||
|
||||
# Database settings
|
||||
DATABASE_URL=postgresql://user:password@db:5432/app_db
|
||||
|
||||
# Redis settings
|
||||
REDIS_URL=redis://redis:6379/0
|
||||
|
||||
# Email settings
|
||||
MAIL_SERVER=smtp.example.com
|
||||
MAIL_PORT=587
|
||||
MAIL_USE_TLS=True
|
||||
MAIL_USERNAME=user@example.com
|
||||
MAIL_PASSWORD=password
|
||||
MAIL_DEFAULT_SENDER=user@example.com
|
||||
|
||||
# Security settings
|
||||
HTTPS_ENABLED=True
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Create uploads directory
|
||||
mkdir -p app/uploads
|
||||
|
||||
echo "Setup complete. You can now run 'docker-compose up -d' to start the application."
|
Loading…
Add table
Add a link
Reference in a new issue