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
3b0ffc0
commit 74cca6a
Showing
2 changed files
with
14 additions
and
14 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 |
---|---|---|
|
@@ -150,5 +150,5 @@ docker-compose.yml | |
Procfile | ||
pyproject.toml | ||
README.md | ||
Pipfile | ||
Pipfile.lock | ||
#Pipfile | ||
#Pipfile.lock |
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,20 +1,20 @@ | ||
FROM python:3.10 as py | ||
FROM python:3.10 | ||
|
||
FROM py as build | ||
RUN apt update && apt install -y g++ git && pip install --upgrade pip | ||
|
||
RUN apt update && apt install -y g++ git | ||
RUN useradd modmail | ||
USER modmail | ||
WORKDIR /home/modmail | ||
|
||
RUN pip install --user pipenv | ||
|
||
COPY requirements.txt / | ||
RUN pip install --prefix=/inst -U -r /requirements.txt | ||
ENV PATH="/home/modmail/.local/bin:${PATH}" | ||
|
||
FROM py | ||
COPY --chown=modmail:modmail Pipfile Pipfile.lock ./ | ||
RUN pipenv install | ||
|
||
COPY --from=build /inst /usr/local | ||
COPY --chown=modmail:modmail . . | ||
|
||
ENV USING_DOCKER yes | ||
RUN useradd --system --no-create-home modmail | ||
USER modmail | ||
|
||
WORKDIR /modmailbot | ||
CMD ["python", "bot.py"] | ||
COPY --chown=modmail:modmail . /modmailbot | ||
CMD ["pipenv", "run", "bot"] |