commit 6d564ffdcd5024a1bd72f398d8d8563ef5248607 Author: AlxCzl Date: Sun Nov 28 21:30:22 2021 +0100 init diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d259ec7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +*.pyc +.git/ +Dockerfile \ No newline at end of file diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..089ad61 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,23 @@ +--- +kind: pipeline +type: docker +name: default + +platform: + os: linux + arch: amd64 + +steps: + - name: docker + image: plugins/docker + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: registry.alxczl.fr/ldap-interface + repository: registry.alxczl.fr + tags: latest + when: + branch: + - master \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..224ddc7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pyc +venv \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e73b6e0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.9-alpine + +COPY requirements.txt / + +RUN pip3 install -r /requirements.txt + +COPY ./app/ /app + +WORKDIR /app + +EXPOSE 80/tcp + +ENTRYPOINT ["./entrypoint.sh"] \ No newline at end of file diff --git a/app/entrypoint.sh b/app/entrypoint.sh new file mode 100644 index 0000000..51bcb57 --- /dev/null +++ b/app/entrypoint.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +gunicorn app:app --bind "0.0.0.0:80" -w 2 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9c6a7e4 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,11 @@ +click==8.0.3 +Flask==2.0.2 +gunicorn==20.1.0 +importlib-metadata==4.8.2 +itsdangerous==2.0.1 +Jinja2==3.0.3 +MarkupSafe==2.0.1 +typing_extensions==4.0.0 +Werkzeug==2.0.2 +zipp==3.6.0 +python-ldap \ No newline at end of file