From afd3e8e77d7ae6ba1eefbc56da335f7c990d9904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Tue, 2 Aug 2022 11:36:39 +0300 Subject: [PATCH] Initial commit --- .drone.yml | 2 ++ .flake8 | 6 ++++++ .pre-commit-config.yaml | 6 ++++++ Dockerfile | 4 ++++ docker-compose.yml | 12 ++++++++++++ exception-test.py | 2 ++ 6 files changed, 32 insertions(+) create mode 100644 .drone.yml create mode 100644 .flake8 create mode 100644 .pre-commit-config.yaml create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100755 exception-test.py diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..e7b5dfa --- /dev/null +++ b/.drone.yml @@ -0,0 +1,2 @@ +kind: template +load: docker.yaml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..ff6c948 --- /dev/null +++ b/.flake8 @@ -0,0 +1,6 @@ +[flake8] +inline-quotes = " +multiline-quotes = """ +indent-size = 4 +max-line-length = 160 +ignore = Q003 E128 E704 E731 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..aab2253 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,6 @@ +repos: +- repo: https://github.com/PyCQA/flake8 + rev: 3.9.2 + hooks: + - id: flake8 + additional_dependencies: [flake8-typing-imports==1.10.0,flake8-quotes==3.2.0] diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b05b545 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM harbor.k-space.ee/k-space/microservice-base +ADD exception-test.py /exception-test.py +ENV PYTHONUNBUFFERED=1 +ENTRYPOINT /exception-test.py diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3b9375b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.7' + +services: + exception-test: + restart: always + network_mode: host + build: + context: . +# entrypoint: /app/camdetect.py +# command: http://user:123456@localhost:8080/?action=stream +# environment: *common + diff --git a/exception-test.py b/exception-test.py new file mode 100755 index 0000000..a586b9b --- /dev/null +++ b/exception-test.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 +raise Exception("foo")