forked from n3d1117/chatgpt-telegram-bot
-
Notifications
You must be signed in to change notification settings - Fork 2
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
8f537db
commit e35a41b
Showing
3 changed files
with
44 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Use the official Python image as the base image | ||
FROM python:3.10.8 | ||
|
||
# Create a user named appuser | ||
RUN useradd -m appuser | ||
|
||
# Switch to the appuser user | ||
USER appuser | ||
|
||
WORKDIR /home/appuser/ | ||
|
||
ENV PATH="/home/appuser/.local/bin:$PATH" | ||
|
||
# Install pipenv | ||
RUN pip install --user pipenv | ||
|
||
# Pull the repository from Github | ||
RUN git clone --depth=1 https://github.com/n3d1117/chatgpt-telegram-bot.git app | ||
|
||
# Enter the repository directory | ||
WORKDIR /home/appuser/app | ||
|
||
# Install the dependencies specified in the Pipfile in the repository | ||
RUN pipenv install --deploy | ||
|
||
ENTRYPOINT ["python", "-m", "pipenv", "run"] | ||
# Run the main.py file | ||
CMD ["python", "main.py"] |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: '3' | ||
services: | ||
chatgpt: | ||
image: sheepgreen/chatgpt | ||
volumes: | ||
- ./.env:/home/appuser/app/.env | ||
restart: always |