|
| 1 | +# Copyright 2020 T-Mobile, USA, Inc. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# |
| 15 | +# Trademark Disclaimer: Neither the name of T-Mobile, USA, Inc. nor the names of |
| 16 | +# its contributors may be used to endorse or promote products derived from this |
| 17 | +# software without specific prior written permission. |
| 18 | + |
| 19 | +from os import environ as env |
| 20 | +import multiprocessing |
| 21 | + |
| 22 | +APP_PORT = int(env.get("APP_PORT", 5000)) |
| 23 | +APP_DEBUG = int(env.get("APP_DEBUG", 1)) |
| 24 | +magtape_tls_path = "/tls" |
| 25 | + |
| 26 | +# Gunicorn config |
| 27 | +bind = ":" + str(APP_PORT) |
| 28 | +workers = multiprocessing.cpu_count() * 2 + 1 |
| 29 | +threads = 2 * multiprocessing.cpu_count() |
| 30 | +certfile = magtape_tls_path + "/cert.pem" |
| 31 | +keyfile = magtape_tls_path + "/key.pem" |
0 commit comments