From 5516a7d29e3a8e866146cfb96ab1dfecf4189fb6 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Wed, 1 Mar 2023 16:05:20 +0400 Subject: [PATCH] Docker image version code --- Makefile | 3 ++- README.md | 3 ++- version_code | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 version_code diff --git a/Makefile b/Makefile index 7bfd8bf..d2aa644 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,8 @@ check: python3 -m pylint app/ docker: - docker build -t ${REPO_OWNER_LOWER}/${REPO_NAME_SNAKE} . + python3 -m dotenv -f version_code run \ + docker build -t ${REPO_OWNER_LOWER}/${REPO_NAME_SNAKE}:$$VERSION . clean: rm -rf app/__pycache__ diff --git a/README.md b/README.md index 5cf118c..a463a5b 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,8 @@ corresponding to your database structure as explained below ([Structure > Database](#database)) 7. Check if `Makefile`, `Dockerfile`, `docker-compose.yml` are correct 8. Run the formatter and linters (`make format`, then `make check`) -9. Build a docker image and [publish](#publishing-app) it +9. Edit the `version_code` file if needed, +build a docker image and [publish](#publishing-app) it ### Makefile Make commands: diff --git a/version_code b/version_code new file mode 100644 index 0000000..aa40e78 --- /dev/null +++ b/version_code @@ -0,0 +1,3 @@ +# Your app's version code: +# (used as a docker image tag) +VERSION=1.0.0