Docker API & Database - PARC-projects/video-query-home GitHub Wiki
The API is served by Gunicorn and proxied to NGNIX for client consumption. It is recommended that you either update the provided nginx.conf prior to building the container to suit your deployment needs, or you proxy external traffic coming from your own web-server to exposed endpoint provided by the container.
1. Build the docker images
docker-compose build
2. Run containers
docker-compose up
Verify that the user-defined Docker network named 'video-query-api_default' exists and has an IP assigned to video-query-api:
docker network inspect video-query-api_default
3. Create superuser if one does not already exist (use a separate terminal)
docker-compose run --no-deps web python manage.py createsuperuser
Follow the prompts to create an application admin user.
http://localhost:1337.
Once the container is running, the application is exposed atNote: src/entrypoint.sh needs to be executable. In some cases, after cloning the github repository the executable bit may not be set. In such cases, turn on execution using sudo chmod +x src/entrypoint.sh
.