This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.11-bullseye | |
ENV PYTHONUNBUFFERED 1 | |
ENV LOCALSTACK_HOSTNAME=localstack \ | |
S3_HOSTNAME=localstack \ | |
AWS_DEFAULT_REGION=us-east-1 | |
RUN apt-get update && apt-get install -y jq gnupg software-properties-common unzip \ | |
&& curl -OL https://releases.hashicorp.com/terraform/1.5.4/terraform_1.5.4_linux_amd64.zip \ | |
&& unzip terraform_1.5.4_linux_amd64.zip \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
import uwsgi | |
is_using_uwsgi = True | |
except ImportError: | |
is_using_uwsgi = False | |
def is_uwsgi_prefork(): | |
"""Checks if code is currently being executed within a uWSGI pre-fork worker.""" |