Hello,
Is possible to deploy a django app with daphne, and postgress manage database, and a redis manage database, direct form github automaticly?
Or I should deploy with docker?
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You can definitely deploy a Django app with Daphne by pointing it at your GitHub repository.
During the setup you will need to configure your environment variables and required databases, after that’s done you can deploy automatically with every code merge or manually with the deploy button.
App Platform can create a dev Postgres instance for you which can be upgraded to production grade later on if necessary. You’ll have to pre-create the Redis server in our Managed Databases section.
Here’s an example spec of a Django app that has a Redis and Postgres DB connected to it:
name: sample-django
region: nyc
services:
- environment_slug: python
envs:
- key: DATABASE_URL
scope: RUN_TIME
value: ${my-postgres.DATABASE_URL}
- key: REDIS_URL
scope: RUN_TIME
value: ${my-redis.DATABASE_URL}
github:
branch: main
deploy_on_push: true
repo: digitalocean/sample-django
http_port: 8080
instance_count: 1
instance_size_slug: basic-xxs
name: sample-django
routes:
- path: /
run_command: gunicorn --worker-tmp-dir /dev/shm
databases:
- cluster_name: my-redis
engine: REDIS
name: my-redis
production: true
version: "5"
- cluster_name: my-postgres
engine: PG
name: my-postgres
production: true
version: "12"
You can find this spec in your app/settings/view spec area.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.