#!/usr/bin/env bash


if [[ -z "$@" ]]; then
    # Creates an uwsgi service with 4 processes (override by setting UWSGI_NUM_PROCESSES environment variable)
    # of the app.
    exec uwsgi --http-socket 0.0.0.0:80 \
               --drop-after-init \
               --uid nobody \
               --gid nogroup \
               --master \
               --buffer-size 65535 \
               --processes ${UWSGI_NUM_PROCESSES:-4} \
               --need-app --module vehicle_tickets.wsgi:app
else
    exec $@
fi


