-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple upgrades to get the system working locally with docker and D…
…jango 3 (#310) * Update defusedxml to 0.6.0. Fixes #288. * Update isort version for pre-commit. The repo switched from "master" to "main" branch naming. * Multiple changes to make the project work easily in Docker * Upgrade to Django 3.2 * use python3.9-slim docker image to avoid issues with alpine Co-authored-by: Jordi Bagot <[email protected]>
- Loading branch information
Showing
12 changed files
with
53 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,16 @@ | ||
FROM python:3-alpine as builder | ||
FROM python:3.9-slim | ||
|
||
WORKDIR /home/python | ||
|
||
RUN apk add --no-cache zlib-dev build-base python-dev jpeg-dev | ||
RUN pip install virtualenv | ||
RUN virtualenv venv | ||
RUN apt update && apt install -y zlib1g-dev build-essential libjpeg-dev | ||
|
||
ADD requirements.txt /home/python/ | ||
RUN venv/bin/pip install --no-cache-dir -r requirements.txt | ||
RUN virtualenv --relocatable venv/ | ||
ADD requirements.txt . | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
ADD . /home/python/ | ||
RUN venv/bin/python manage.py migrate | ||
|
||
FROM python:3-alpine | ||
|
||
WORKDIR /home/python | ||
COPY --from=builder /home/python /home/python | ||
COPY --from=builder /lib /lib | ||
COPY --from=builder /usr/lib /usr/lib | ||
ADD . . | ||
RUN python manage.py migrate | ||
|
||
STOPSIGNAL SIGINT | ||
ENTRYPOINT ["venv/bin/python", "manage.py"] | ||
ENV DJANGO_SETTINGS_MODULE=get_together.environ_settings | ||
CMD ["runserver", "0.0.0.0:8000"] | ||
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<table> | ||
{{ event_form }} | ||
{{ event_form }} | ||
{{ event_form.media }} | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
|
||
class ResumeConfig(AppConfig): | ||
name = "Resume" | ||
name = "resume" |