diff --git a/Makefile b/Makefile index 3485be1d..928a90d8 100644 --- a/Makefile +++ b/Makefile @@ -37,3 +37,12 @@ test: clear_cache: python manage.py clear_cache + +docker-build: + docker build -t swapi . + +docker-run: + docker run -p8000:8000 --name swapi-local-container --rm swapi + +docker-kill: + docker kill swapi-local-container diff --git a/README.md b/README.md index e5cec846..b2cf502e 100644 --- a/README.md +++ b/README.md @@ -12,5 +12,20 @@ An "unofficial" branch of "swapi", supported by @juriy ## Will it be updated? -Original swapi project is built on Python/Django stack that is quite outdated by now. It would be a great exercise to rewrite it in cloud-native manner, but this requires time and effort. I'm looking into doing that. There's no timelines yet, since "swapi" stopped its existence quite suddenly. Suggestions and help are always welcome! +Original swapi project is built on Python/Django stack that is quite outdated by now. +It would be a great exercise to rewrite it in cloud-native manner, but this requires time and effort. I'm looking into doing that. There's no timelines yet, since "swapi" stopped its existence quite suddenly. Suggestions and help are always welcome! + +## How to run it? +The easiest way to run swapi – via docker + +``` +# Ruilding the image +make docker-build + +# Running the container +make docker-run + +# Kill the running container +make docker-kill +``` diff --git a/swapi/templates/base.html b/swapi/templates/base.html index 458e541f..d43b0373 100644 --- a/swapi/templates/base.html +++ b/swapi/templates/base.html @@ -11,6 +11,8 @@ + + @@ -22,6 +24,9 @@ gtag('js', new Date()); gtag('config', 'UA-163610532-1'); + + +