-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
866 additions
and
1,075 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
12 changes: 12 additions & 0 deletions
12
lib-injection/build/docker/python/dd-lib-python-init-test-django-27/Dockerfile
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM python:2.7 | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV DJANGO_SETTINGS_MODULE django_app | ||
WORKDIR /src | ||
ADD . /src | ||
RUN pip install django | ||
EXPOSE 18080 | ||
|
||
# Many users run a non-root user, ensure this is supported by the injection mechanism | ||
USER 1000 | ||
CMD python -m django runserver 0.0.0.0:18080 |
6 changes: 6 additions & 0 deletions
6
lib-injection/build/docker/python/dd-lib-python-init-test-django-27/build.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "${BUILDX_PLATFORMS}" ] ; then | ||
BUILDX_PLATFORMS=`docker buildx imagetools inspect --raw python:3.12 | jq -r 'reduce (.manifests[] | [ .platform.os, .platform.architecture, .platform.variant ] | join("/") | sub("\\/$"; "")) as $item (""; . + "," + $item)' | sed 's/,//'` | ||
fi | ||
docker buildx build --platform ${BUILDX_PLATFORMS} --tag ${LIBRARY_INJECTION_TEST_APP_IMAGE} --push . |
29 changes: 29 additions & 0 deletions
29
lib-injection/build/docker/python/dd-lib-python-init-test-django-27/django_app.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
import signal | ||
import sys | ||
|
||
from django.http import HttpResponse | ||
from django.conf.urls import url | ||
|
||
|
||
def handle_sigterm(signo, sf): | ||
sys.exit(0) | ||
|
||
|
||
signal.signal(signal.SIGTERM, handle_sigterm) | ||
|
||
|
||
filepath, extension = os.path.splitext(__file__) | ||
ROOT_URLCONF = os.path.basename(filepath) | ||
DEBUG = False | ||
SECRET_KEY = "fdsfdasfa" | ||
ALLOWED_HOSTS = ["*"] | ||
|
||
|
||
def index(request): | ||
return HttpResponse("test") | ||
|
||
|
||
urlpatterns = [ | ||
url("", index), | ||
] |
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
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
Oops, something went wrong.