Check the documentation here.
Check the documentation here.
Check the documentation here.
Check the documentation here.
auth: port 8001cdn_api: port 8002stream_api: port 8003
-
Run
devdocker compose:sh ./scripts/dev.sh up -
Set up each service following docs from this section.
- Create user with superuser privileges following the docs.
- Sign in at
Authservice to get JWT credentials. Save access JWT, you will need it later.curl --location 'http://localhost:8001/api/v1/auth/signin' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'username=superuser' \ --data-urlencode 'password=Qwerty123' - Upload video via
CDN APIservice. Saveidof a task to check its status later.curl --location 'http://localhost:8002/api/v1/upload?video_id=c1efb7fe-d8a1-45ee-b939-e7c4df8cd666' \ --form 'file=@"/Users/superuser-name/short_movie.mp4"' - The video upload and processing has been started. Check the status via
CDN APIservice:Once the status iscurl --location 'http://localhost:8002/api/v1/tasks/119a5b2e-990e-4ae8-b666-aedacde78bc5'done, go to the next step. - Get a video manifest file (.m3u8) via
Stream APIusing your access token:curl --location 'http://localhost:8003/api/v1/hls/manifest/c1efb7fe-d8a1-45ee-b939-e7c4df8cd666' \ --header 'Authorization: ACCESS_TOKEN'
- copy cdn_api, stream_api, video_converter .env.prod.example into .env.prod in the same folders
- copy ./docker/.env.prod.example into ./docker/.env.prod
- execute set -a && source ./docker/.env.prod
- execute ./scripts/prod.sh up
- go to localhost:9001 and login with minio credentials from env file and generate new minio access key
- replace minio keys in .env.prod files in cdn_api, stream_api, video_converter
- down the server ./scripts/prod.sh down
- restart the server ./scripts/prod.sh up
- connect to auth container - run migrations, create superuser. (instruction can be found in docs for auth service)
- Now everything is ready to consume api. Learn docs and have fun :)