Deploy a video processing pipeline app on Koyeb
Learn more about Koyeb
·
Explore the documentation
·
Discover our tutorials
Koyeb is a developer-friendly serverless platform to deploy apps globally. No-ops, servers, or infrastructure management. This repository contains a job search application you can deploy on the Koyeb serverless platform for testing.
This example application, when deployed alongside its companion video processing worker service, allows you to upload videos that will be automatically tagged and categorized by AssemblyAI. This repository is the web application built in Django. It allows users to upload videos and play uploaded content. During the upload, videos are passed to the worker service for tagging and categorization.
Follow the steps below to deploy and run the example video processing pipeline application on your Koyeb account.
- A Koyeb account to build, deploy, and run this application.
- A web-accessible PostgreSQL database to store content. You can use Koyeb's PostgreSQL databases to fulfill this requirement.
Once you have a PostgreSQL database deployed, you can deploy the video processing web app. In the Koyeb Control Panel, on the Overview tab, click the Create Web Service button to begin:
-
Select GitHub as the deployment method.
-
Select your project repository if you forked this repository. Alternatively, enter
https://github.com/koyeb/example-video-processing-app
in the Public GitHub repository field to use this repository as-is. -
In the Builder section, override the Run command with
python manage.py runserver 0.0.0.0:8000
. -
In the App and Service names section, configure the App name. This will impact the environment variable values you define next.
-
In the Environment variables section, click Bulk edit to enter multiple environment variables at once. In the text box that appears, paste the following:
DJANGO_DB_HOST= DJANGO_DB_USER= DJANGO_DB_PASSWORD= DJANGO_DB_NAME= ALLOWED_HOSTS= CSRF_TRUSTED_ORIGINS= DOMAIN= DJANGO_SECRET_KEY= WORKER_URL=
Fill in the variables as follows:
DJANGO_DB_HOST
: The hostname of the PostgreSQL database.DJANGO_DB_USER
: The PostgreSQL username to authenticate with.DJANGO_DB_PASSWORD
: The PostgreSQL password to authenticate with.DJANGO_DB_NAME
: The name of the PostgreSQL database to connect to.ALLOWED_HOSTS
: The bare hostname where this application will be deployed (withouthttps://
).CSRF_TRUSTED_ORIGINS
: The domain where this application will be deployed (withhttps://
).DOMAIN
: The domain where this application will be deployed (withhttps://
).DJANGO_SECRET_KEY
: A secret key used for encryption by Django. If you have Django installed locally, you can generate one by typing:python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
.WORKER_URL
: The URL where the worker service will be deployed (withhttps://
).
-
Click Deploy.
Once the web application is up and running, you can deploy the worker service responsible for processing videos.
If you have any questions, ideas or suggestions regarding this application sample, feel free to open an issue or fork this repository and open a pull request.