generated from ita-social-projects/DevTemplate
-
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.
- Loading branch information
1 parent
495c9b6
commit ba9e2d6
Showing
8 changed files
with
35 additions
and
19 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
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,16 +1,28 @@ | ||
FROM python:3.9-alpine | ||
|
||
WORKDIR /Forum | ||
RUN mkdir -p /home/forum | ||
|
||
RUN addgroup --system forum && adduser --system --group forum | ||
|
||
ENV HOME=/home/forum | ||
ENV APP_HOME=/home/forum/app | ||
RUN mkdir $APP_HOME | ||
RUN mkdir $APP_HOME/forum/static | ||
RUN mkdir $APP_HOME/forum/media | ||
WORKDIR $APP_HOME | ||
|
||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# install psycopg2 dependencies | ||
RUN apk update \ | ||
&& apk add postgresql-dev gcc python3-dev musl-dev | ||
|
||
RUN pip install --upgrade pip | ||
COPY ./requirements.txt . | ||
RUN pip3 install -r requirements.txt | ||
|
||
COPY . /Forum | ||
COPY . $APP_HOME | ||
|
||
RUN chown -R forum:forum $APP_HOME | ||
|
||
USER forum |
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