-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Production ready docker #919
Changes from 9 commits
a1110b6
55cda07
0b56548
b502e14
f2d3ec1
5e111f8
dcf4f6c
f18ee2d
bbf2229
2fe04ee
1083dbc
ba361be
0dc34bb
28d4a44
5e225f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,22 @@ | ||
.dockerignore | ||
.env | ||
.git | ||
.github | ||
.gitignore | ||
.isort.cfg | ||
.readthedocs.yaml | ||
.travis.yml | ||
.venv | ||
.vscode | ||
assets | ||
CHANGELOG.md | ||
CONTRIBUTORS | ||
docker-compose.* | ||
Dockerfile | ||
docs | ||
LICENSE | ||
Makefile | ||
MANIFEST.in | ||
README.md | ||
SECURITY.md | ||
tox.ini |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
FROM python:3.7-alpine | ||
FROM python:3.9-alpine | ||
|
||
ENV PORT="8000" | ||
|
||
# ihatemoney configuration | ||
ENV DEBUG="False" \ | ||
ACTIVATE_ADMIN_DASHBOARD="False" \ | ||
ACTIVATE_DEMO_PROJECT="True" \ | ||
|
@@ -21,13 +24,22 @@ ENV DEBUG="False" \ | |
ENABLE_CAPTCHA="False" \ | ||
LEGAL_LINK="False" | ||
|
||
RUN mkdir -p /etc/ihatemoney &&\ | ||
pip install --no-cache-dir gunicorn pymysql; | ||
|
||
ADD . /src | ||
|
||
RUN pip install --no-cache-dir -e /src | ||
RUN echo "**** install runtime packages ****" && \ | ||
apk add --no-cache \ | ||
shadow && \ | ||
echo "**** create runtime folder ****" && \ | ||
mkdir -p /etc/ihatemoney &&\ | ||
echo "**** install pip packages ****" && \ | ||
pip install --no-cache-dir gunicorn pymysql && \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about installing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried adding it afterwards by running from a simple local Dockerfile like this: FROM ihatemoney/ihatemoney:5.1.1
RUN pip install --no-cache-dir psycopg2 But building fails, not sure why - I don't really have experience using python. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you tell us how it fails, maybe you have some logs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I've opened a proper Issue: #924 |
||
pip install --no-cache-dir -e /src && \ | ||
echo "**** create user abc:abc ****" && \ | ||
useradd -u 1000 -U -d /src abc && \ | ||
echo "**** cleanup ****" && \ | ||
rm -rf \ | ||
/tmp/* | ||
|
||
VOLUME /database | ||
EXPOSE 8000 | ||
EXPOSE ${PORT} | ||
ENTRYPOINT ["/src/conf/entrypoint.sh"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using 3.10-alpine? Is it because we don't officially support it yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, didn't test with 3.10, but once tests are updated we should update this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can go ahead with 3.10 now that #921 was merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright !