-
Notifications
You must be signed in to change notification settings - Fork 0
Docker API & Database
Frank Torres edited this page Jan 28, 2020
·
17 revisions
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.
docker-compose build
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
docker-compose run --no-deps web python manage.py createsuperuser
Follow the prompts to create an application admin user.
Once the container is running, the application is exposed at http://localhost:1337.
Note: 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
.