Merge "api: Replace conflicting environment variable"
This commit is contained in:
commit
5476454e4a
|
@ -197,10 +197,19 @@ conf:
|
||||||
|
|
||||||
pod:
|
pod:
|
||||||
env:
|
env:
|
||||||
|
# NOTE(@drewwalters96): These configuration values change the Armada API's
|
||||||
|
# uWSGI configuration.
|
||||||
armada_api:
|
armada_api:
|
||||||
# ARMADA_API_PORT should = conf.armada.armada_api.bind_port in standard cases
|
# # NOTE: ARMADA_UWSGI_PORT should match conf.armada.armada_api.bind_port in
|
||||||
- name: ARMADA_API_PORT
|
# # standard use cases
|
||||||
value: 8000
|
# - name: ARMADA_UWSGI_PORT
|
||||||
|
# value: "8000"
|
||||||
|
# - name: ARMADA_UWSGI_TIMEOUT
|
||||||
|
# value: "3600"
|
||||||
|
# - name: ARMADA_UWSGI_WORKERS
|
||||||
|
# value: "4"
|
||||||
|
# - name: ARMADA_UWSGI_THREADS
|
||||||
|
# value: "1"
|
||||||
# - name: http_proxy
|
# - name: http_proxy
|
||||||
# value: http://proxy.example.com:8080
|
# value: http://proxy.example.com:8080
|
||||||
# - name: https_proxy
|
# - name: https_proxy
|
||||||
|
|
|
@ -19,13 +19,13 @@ set -ex
|
||||||
CMD="armada"
|
CMD="armada"
|
||||||
|
|
||||||
# Define port
|
# Define port
|
||||||
ARMADA_API_PORT=${ARMADA_API_PORT:-8000}
|
ARMADA_UWSGI_PORT=${ARMADA_UWSGI_PORT:-8000}
|
||||||
# How long uWSGI should wait for each Armada response
|
# How long uWSGI should wait for each Armada response
|
||||||
ARMADA_API_TIMEOUT=${ARMADA_API_TIMEOUT:-"3600"}
|
ARMADA_UWSGI_TIMEOUT=${ARMADA_UWSGI_TIMEOUT:-"3600"}
|
||||||
# Number of uWSGI workers to handle API requests
|
# Number of uWSGI workers to handle API requests
|
||||||
ARMADA_API_WORKERS=${ARMADA_API_WORKERS:-"4"}
|
ARMADA_UWSGI_WORKERS=${ARMADA_UWSGI_WORKERS:-"4"}
|
||||||
# Threads per worker
|
# Threads per worker
|
||||||
ARMADA_API_THREADS=${ARMADA_API_THREADS:-"1"}
|
ARMADA_UWSGI_THREADS=${ARMADA_UWSGI_THREADS:-"1"}
|
||||||
|
|
||||||
# Start Armada application
|
# Start Armada application
|
||||||
# TODO(fmontei): Should be specifying callable too. But Armada spins up the
|
# TODO(fmontei): Should be specifying callable too. But Armada spins up the
|
||||||
|
@ -34,16 +34,16 @@ if [ "$1" = 'server' ]; then
|
||||||
exec uwsgi \
|
exec uwsgi \
|
||||||
-b 32768 \
|
-b 32768 \
|
||||||
--die-on-term \
|
--die-on-term \
|
||||||
--http :${ARMADA_API_PORT} \
|
--http :${ARMADA_UWSGI_PORT} \
|
||||||
--http-timeout $ARMADA_API_TIMEOUT \
|
--http-timeout $ARMADA_UWSGI_TIMEOUT \
|
||||||
--enable-threads \
|
--enable-threads \
|
||||||
-L \
|
-L \
|
||||||
--lazy-apps \
|
--lazy-apps \
|
||||||
--master \
|
--master \
|
||||||
--paste config:/etc/armada/api-paste.ini \
|
--paste config:/etc/armada/api-paste.ini \
|
||||||
--pyargv "--config-file /etc/armada/armada.conf" \
|
--pyargv "--config-file /etc/armada/armada.conf" \
|
||||||
--threads $ARMADA_API_THREADS \
|
--threads $ARMADA_UWSGI_THREADS \
|
||||||
--workers $ARMADA_API_WORKERS
|
--workers $ARMADA_UWSGI_WORKERS
|
||||||
else
|
else
|
||||||
exec $CMD "$@"
|
exec $CMD "$@"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue