-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep the dev Dockerfile as a separate file
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Start with a lightweight python 3 image | ||
FROM python:3-alpine | ||
|
||
# Send python output in real-time without needing to be buffered | ||
ENV PYTHONUNBUFFERED=1 | ||
# Don't write .pyc files when importing source modules | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
WORKDIR /code | ||
COPY requirements.txt /code | ||
|
||
# Install the packages needed to install psycopg2-binary: https://stackoverflow.com/a/47871121 | ||
RUN \ | ||
apk add --no-cache postgresql-libs && \ | ||
apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev && \ | ||
# Install all python dependencies | ||
pip install -r requirements.txt --no-cache-dir && \ | ||
apk --purge del .build-deps | ||
|
||
COPY . /code | ||
WORKDIR /code/stockhelper | ||
# Initialize the SQLite databases | ||
RUN python manage.py migrate | ||
# Load the flashcards data | ||
RUN python manage.py loaddata cards.json |
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