From 11148175c5965d2c99f307604071117d1b923f00 Mon Sep 17 00:00:00 2001 From: Pritam Date: Sat, 9 Jan 2021 14:29:53 +0530 Subject: [PATCH] WIP: docker and tbump doc --- Dockerfile | 18 ++++++++++++++++++ README.md | 6 ++++-- docker_build.sh | 4 ++++ documentation/wiki/tbump.md | 7 +++++++ prestart.sh | 0 uwsgi.ini | 3 +++ 6 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 Dockerfile create mode 100755 docker_build.sh create mode 100644 documentation/wiki/tbump.md create mode 100644 prestart.sh create mode 100644 uwsgi.ini diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ce021ba --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM tiangolo/uwsgi-nginx:python3.8 + +LABEL maintainer="Pritam Sarkar <001pritam2012@gmail.com>" + +#RUN make setup +# +## Move the base entrypoint to reuse it +#RUN mv /entrypoint.sh /uwsgi-nginx-entrypoint.sh +## Copy the entrypoint that will generate Nginx additional configs +#COPY entrypoint.sh /entrypoint.sh +#RUN chmod +x /entrypoint.sh +# +#ENTRYPOINT ["/entrypoint.sh"] + +# Run the start script provided by the parent image tiangolo/uwsgi-nginx. +# It will check for an /app/prestart.sh script (e.g. for migrations) +# And then will start Supervisor, which in turn will start Nginx and uWSGI +#CMD ["/prestart.sh"] diff --git a/README.md b/README.md index 7f4b5c2..7e8216d 100644 --- a/README.md +++ b/README.md @@ -87,8 +87,9 @@ Contributing ------------------------------------------------------------------------------ 1. Stargaze this repository 1. Fork this repository +1. Add this project as `upstream` 1. Commit your changes -1. Create pull request to `development` branch +1. Create pull request to `upstream/development` branch [![](https://sourcerer.io/fame/pritam001/pritam001/pyflask-microservice-base/images/0)](https://sourcerer.io/fame/pritam001/pritam001/pyflask-microservice-base/links/0) [![](https://sourcerer.io/fame/pritam001/pritam001/pyflask-microservice-base/images/1)](https://sourcerer.io/fame/pritam001/pritam001/pyflask-microservice-base/links/1) @@ -107,6 +108,7 @@ TODO - [x] Introduction of testing tools - [ ] Testing tools documentation - [x] Code coverage -- [ ] Version handling by tbump +- [x] Version handling by tbump +- [x] Docker support - [ ] Add CoC, Contribution guidelines, PR and issue templates diff --git a/docker_build.sh b/docker_build.sh new file mode 100755 index 0000000..282cbb5 --- /dev/null +++ b/docker_build.sh @@ -0,0 +1,4 @@ +#!/bin/bash +app="docker.image.pyflask-base" +docker build -t ${app} . +docker run -d -p 56733:80 --name=${app} -v $PWD:/app ${app} diff --git a/documentation/wiki/tbump.md b/documentation/wiki/tbump.md new file mode 100644 index 0000000..6067363 --- /dev/null +++ b/documentation/wiki/tbump.md @@ -0,0 +1,7 @@ +### Track remote branch from local repository + +`git push -u origin ` + +### How to bump version with tbump + +`tbump 1.0.0` diff --git a/prestart.sh b/prestart.sh new file mode 100644 index 0000000..e69de29 diff --git a/uwsgi.ini b/uwsgi.ini new file mode 100644 index 0000000..6dee078 --- /dev/null +++ b/uwsgi.ini @@ -0,0 +1,3 @@ +[uwsgi] +module = service +callable = app