forked from modmail-dev/Modmail
-
Notifications
You must be signed in to change notification settings - Fork 4
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
beaa661
commit d6ec5b0
Showing
4 changed files
with
56 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
FROM python:3.10-alpine as base | ||
FROM python:3.11-alpine as base | ||
|
||
RUN apk update && apk add git cairo-dev cairo cairo-tools \ | ||
RUN apk update && apk add git \ | ||
# cairosvg dependencies | ||
cairo-dev cairo cairo-tools \ | ||
# pillow dependencies | ||
jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev | ||
jpeg-dev zlib-dev | ||
|
||
FROM base AS python-deps | ||
FROM base as python-deps | ||
|
||
RUN apk add --virtual build-dependencies build-base gcc libffi-dev | ||
RUN apk add --virtual build-deps build-base gcc libffi-dev | ||
COPY requirements.txt / | ||
RUN pip install --prefix=/inst -U -r /requirements.txt | ||
|
||
COPY Pipfile Pipfile.lock / | ||
RUN pip install pipenv && PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy | ||
|
||
FROM base AS runtime | ||
|
||
COPY --from=python-deps /.venv /.venv | ||
ENV PATH="/.venv/bin:$PATH" | ||
FROM base as runtime | ||
|
||
ENV USING_DOCKER yes | ||
COPY --from=python-deps /inst /usr/local | ||
|
||
COPY . /modmail | ||
WORKDIR /modmail | ||
|
||
CMD ["python", "-m", "bot"] | ||
CMD ["python", "bot.py"] | ||
|
||
RUN adduser --disabled-password --gecos '' app && \ | ||
chown -R app /modmail && chown -R app /.venv | ||
USER app | ||
chown -R app /modmail | ||
USER app |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.