docs: Updated the Docker setup for portal - #610
Conversation
|
@husainattar There are failing tests, please push the changes to these. |
|
Hi @sakshi1499 actually I have not much idea with TRAVIS-CI and I have somehow resolved the failure regarding pull request build but I don't know how to resolve the failure regarding CHECK COMMIT MESSAGES. |
|
@husainattar Actually you have 15 commits and one of them doesn't follow the Commit Guidelines so squash them and the new commit should follow the commit guideline. |
|
@sakshi1499 ohk so I should squash all the 15 commits and create a single one commit as per guidelines? |
|
@husainattar There is an issue with the recent commit message checker, it does not allow capital letters in the subject #624 should fix this. |
|
Ohh Thank you @SanketDG |
|
@husainattar Feel free to squash the commits together! That should let go of the errors. |
b253b4c to
743f8b5
Compare
|
Hi @SanketDG sir I actually tried everything and also squash the commit but still it provides me check-commits error. I would be grateful if anyone can provide help in this.Thank you |
|
@husainattar Should be fixed now! I will review this PR some time later. |
|
Thank you @SanketDG sir thank you for the help. |
SanketDG
left a comment
There was a problem hiding this comment.
This looks good, except for some minor comments.
I will also try fixing the docker documentaiton, so that it's not just a preview, but usable as a "development environment", so that a lot of the problems regarding Installation of Portal can be averted.
| MAINTAINER Ana Balica <ana.balica@gmail.com> | ||
|
|
||
| # Updated by | ||
| LABEL HUSSAIN="husainattar110@gmail.com" |
There was a problem hiding this comment.
I am not sure if this required, lots of people may commit on the Dockerfile in the future, we do not want to create unnecessary noise here.
There was a problem hiding this comment.
I actually used because in future some needs help in changing or understand the docker file.
I tried to contact ana I guess during my docker issues but didn't get a response so I thought to include my mail for any help or maintenance something. Btw I can change it right now.
| # getting the base Image | ||
| FROM python:3.6 | ||
|
|
||
| MAINTAINER Ana Balica <ana.balica@gmail.com> |
There was a problem hiding this comment.
It would be better we have an official Email ID here
There was a problem hiding this comment.
Yes so I can remove my email.
| @@ -1,11 +1,33 @@ | |||
| FROM python:2.7 | |||
| # getting the base Image | |||
| FROM python:3.6 | |||
There was a problem hiding this comment.
Did you check what's the size of the resultant image? We may need to tinker with the base image to get the best results.
There was a problem hiding this comment.
Yes the image size was 1.2GB with python 3.6 having 916MB. I just change the image version to keep update to date with the current documentation.
There was a problem hiding this comment.
Can you try with 3.6-slim-buster, that is the image I use, and as far as I know that's the image with the smallest footprint
There was a problem hiding this comment.
ok sure previously actually I used 3.6-slim and 3.6-alpine but it gave me error.
There was a problem hiding this comment.
Thanks for that it reduced the size of the image to 600MB. I actually didn't use it first because the above-specified versions gave me an error that's why I keep as it is.
| RUN apt-get update | ||
| RUN apt-get install -y software-properties-common | ||
| RUN add-apt-repository ppa:ubuntugis/ppa | ||
| RUN apt-get install -y gdal-bin python-gdal python3-gdal |
There was a problem hiding this comment.
Yes because while building it gives me an error regarding gdal lib not found during executing the cities_light command. So I tried to include and it resolved error.
There was a problem hiding this comment.
Yes because while building it gives me an error regarding gdal lib not found during executing the cities_light command. So I tried to include and it resolved error.
are you sure about "python-gdal" as image using here is python3.6 , then why we need "python-gdal" library of python 2 .
As, gdal lib not found during executing the cities_light command can be fixed by only installing "python3-gdal".
Also , installing "python-gdal" here will also install python2 and other dependency in the image .
So, My suggestion is to only use "python3-gdal" here and verify for issue and also sure image size will further reduce.
| command: python systers_portal/manage.py runserver 0.0.0.0:8000 | ||
| volumes: | ||
| - .:/usr/src/portal | ||
| - .:/usr/src/portal |
There was a problem hiding this comment.
Any reasons for changing this?
There was a problem hiding this comment.
The extra space has actually no specific reason . I have just re-written the docker.yml so to maintain proper indentation I guess have added extra space.
There was a problem hiding this comment.
Generally. indentation is done in multiples of 2, could you change this back?
There was a problem hiding this comment.
Ok, sure I am actually not aware of indentation rule.
Fix the indentation with power of 2's as required.
|
Btw @SanketDG I have included some important additional commands for database and common related issues in documentation. I have just not included on how we can make changes during development and get reflect in running container instantly. |
yes squash it and make a single commit with all changes done in description |
|
Also , @husainattar to update your working branch with Upstream branch , you can do "git rebase" instead of merging it . This approach doesn't create a new commit in your branch. |
|
@husainattar Are you working on this? |
Description
Updated the docker-compose.yml,settings.py, Dockerfile and Readme.md
for easy project installation process through docker.
Fixes # 581
Type of Change:
Delete irrelevant options.
Code/Quality Assurance Only
How Has This Been Tested?
Checklist:
Delete irrelevant options.
Code/Quality Assurance Only