Uses the default Django development server.
-
Rename .env.dev.example and .env.streaming.dev.example to .env.dev and .env.streaming.dev in envs directory.
-
Update the environment variables in the .env.dev and .env.streaming.dev file.
-
Build the images and run the containers:
$ docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build
Test it out at http://localhost:8000. The "movies_admin" and "movies_etl" folder is mounted into the container and your code changes apply automatically.
-
On first run, after initialising the database to fill the database with data:
$ docker exec movies_admin python utils/sqlite_to_postgres/load_data.py
-
On first run, after initialising the minio create a test bucket in the minio.
Uses gunicorn + nginx.
-
Rename .env.prod.example and .env.streaming.prod.example to .env.prod and .env.streaming.prod.
-
Update the environment variables in the .env.prod and .env.streaming.prod file.
-
Build the images and run the containers:
$ docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --build
Test it out at http://localhost:1337. No mounted folders. To apply changes, the image must be re-built.
-
On first run, after initialising the database to fill the database with data:
$ docker exec movies_admin python utils/sqlite_to_postgres/load_data.py
- The application runs as a WSGI/ASGI server.
- To render static files, **Nginx is used.
- Virtualization is done with Docker..
- Server WSGI/ASGI - server running the application.
- Nginx - proxy server which is an entry point for web application.
- PostgreSQL - relational data storage.
- ETL - elasticsearch.
- FFmpeg - FFmpeg.
- Airflow ETL - airflow.
- The application must be run via WSGI/ASGI.
- All system components are hosted in Docker.
- Static files are served by Nginx.
- To work with WSGI/ASGI server the database uses a special user.
- Use docker compose to communicate between containers.