A modern and dynamic website for temple communities.
- Robust admin panel to customize every aspect of the web page
- Accept donations or sell items. Integration with upigateway.com
- Modular and easily extensible code base
- Django
- Tailwind CSS
- Flowbite components and Blocks
-
To install on a ubuntu VPS you can probably run
scripts/install.sh
.# I have made the raw file accessible via a shortened link curl https://bit.ly/twiubd -Lks | bash
Environment Variable | Purpose | Example Value |
---|---|---|
DEBUG | Enable Django debug mode | True |
PROD | Enable production mode | False |
SECRET_KEY | Django secret key for security | your-secret-key-here |
MORE_ALLOWED_HOSTS | Additional allowed hosts (comma-separated IPs/domains) | 139.59.38.218,139.59.38.219 |
PROD_FILES_ROOT | Root directory for production files | /var/www/ |
PROD_DOMAIN | Deployment domain name | whateverdomain.com |
DEPLOYMENT_VERSION | Version identifier for deployment | TestingLocal-Tue-June-20-2023 |
DEFAULT_FROM_EMAIL | Default sender email address | [email protected] |
EMAIL_HOST_USER | SMTP server username | [email protected] |
EMAIL_HOST_PASSWORD | SMTP server password | your-email-password |
PAYMENT_GATEWAY_API_KEY | API key for payment gateway | your-gateway-api-key |
DB_NAME | PostgreSQL database name | unison_db |
DB_USER | PostgreSQL database user | unison_user |
DB_PASSWORD | PostgreSQL database password | your-strong-password |
DB_HOST | PostgreSQL database host | db |
DB_PORT | PostgreSQL database port | 5432 |
CELERY_BROKER_URL | URL for Celery message broker (if using Celery) | redis://localhost:6379 |
CELERY_RESULT_BACKEND | URL for Celery result backend (if using Celery) | redis://localhost:6379 |
-
For production deployment:
- Set
DEBUG=False
- Set
PROD=True
- Ensure
SECRET_KEY
is a strong, unique value - Configure
MORE_ALLOWED_HOSTS
with your server IPs/domains
- Set
-
Email Configuration:
DEFAULT_FROM_EMAIL
andEMAIL_HOST_USER
are typically the same- Ensure
EMAIL_HOST_PASSWORD
is secure and properly configured
-
Database Configuration:
- When using Docker,
DB_HOST
should be set todb
- Ensure
DB_PASSWORD
is strong and secure
- When using Docker,
-
Payment Gateway:
PAYMENT_GATEWAY_API_KEY
is required for processing payments- Keep this key secure and never commit it to version control
- In addition to turning Debug=False, you also need to set Prod=True in the env vars
- ISKCON Barasat Live Website →
Want to deploy this website for your own organization ?
Feel free to create an issue in this repo mentioning your needs and email, and we will get back to you soon.
Other than extensively refering to the Django documentation, I found these articles really helpful.
- Basic server configuration
- How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 22.04
- Setup SSL certificate for HTTPS
Coolify supports docker-compose also, but as of writing this, docker compose deployments are unstable, and cause gateway timeout issues due to improper configuration in the proxy.
Using Dockerfile as deployment method is recommended in Coolify.
First of all deploy a Postgres instance on coolify and make it publicly accessible. Obviously set a very long password. Making the db accessible over internet can help you debug from local machine, and also coolify has some issues with resolving internal addresses when put in env vars. Once the db is deployed copy the values for db host, username, pass and port.
Now deploy the actual app via Dockerfile, and set all the environment variables properly.
Some important settings to be performed from coolify GUI
- General tab --> Network section --> Port exposes: 8000
- Setup the domains, and add them to apt env vars
MORE_ALLOWED_HOSTS
andPROD
- Storages tab --> Add --> Volume mount
- source: a suitable path in your host filesystem
- dest:
/data
(if you change this, you need to changePROD_FILES_ROOT
) To persist static data between deployments, setup a