From b2c61734a5e129a26c08f4f1a1d653a04fd749c5 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 29 Jan 2024 18:46:33 +0200 Subject: [PATCH] Add default email and docker files --- deploy_new_python_project.sh | 1 + skeleton/Dockerfile | 11 +++++++++++ skeleton/podman_build.sh | 2 ++ skeleton/podman_run.sh | 2 ++ 4 files changed, 16 insertions(+) create mode 100644 skeleton/Dockerfile create mode 100755 skeleton/podman_build.sh create mode 100755 skeleton/podman_run.sh diff --git a/deploy_new_python_project.sh b/deploy_new_python_project.sh index bc728a2..4aede46 100755 --- a/deploy_new_python_project.sh +++ b/deploy_new_python_project.sh @@ -21,6 +21,7 @@ function usage() { fi echo "" } +AUTHOR_EMAIL="${USER}@$(hostname -f)" # shellcheck disable=SC1090 if [ -e "$(dirname "${0}")/defaults" ] then diff --git a/skeleton/Dockerfile b/skeleton/Dockerfile new file mode 100644 index 0000000..82da968 --- /dev/null +++ b/skeleton/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3 + +WORKDIR /usr/src/app + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt +COPY . . +RUN pip install . +VOLUME config + +CMD [ "python", "/usr/local/bin/discover_mastodon_servers.py", "--config", "/config/config.conf" ] diff --git a/skeleton/podman_build.sh b/skeleton/podman_build.sh new file mode 100755 index 0000000..88395b3 --- /dev/null +++ b/skeleton/podman_build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +podman build -t discovery-mastodon-servers . diff --git a/skeleton/podman_run.sh b/skeleton/podman_run.sh new file mode 100755 index 0000000..000564e --- /dev/null +++ b/skeleton/podman_run.sh @@ -0,0 +1,2 @@ +#!/bin/sh +podman run --mount type=bind,src=config/,target=/config -t --rm --name discovery-mastodon-servers discovery-mastodon-servers