mirror of https://github.com/knrd1/chatgpt.git
commit
b2ca70279f
|
@ -0,0 +1,17 @@
|
|||
# Use an official Python runtime as a parent image
|
||||
FROM python:3.9-slim-buster
|
||||
|
||||
# Set the working directory in the container to /app
|
||||
WORKDIR /app
|
||||
|
||||
# Add the current directory contents into the container at /app
|
||||
ADD . /app
|
||||
|
||||
# Install any needed packages specified in requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Make port 80 available to the world outside this container
|
||||
EXPOSE 80
|
||||
|
||||
# Run the command to start your application
|
||||
CMD ["python", "./chatgpt.py"]
|
11
README.md
11
README.md
|
@ -17,6 +17,17 @@ $ git clone https://github.com/knrd1/chatgpt.git
|
|||
$ cd chatgpt
|
||||
$ cp example-chat.conf chat.conf
|
||||
```
|
||||
To build the Docker image, you can use the following command:
|
||||
```docker build -t my-python-app .```
|
||||
|
||||
To run the Docker container, you can use the following command:
|
||||
```docker run -p 4000:80 my-python-app```
|
||||
|
||||
This Dockerfile ensures that your application runs in an isolated environment with its dependencies,
|
||||
which enhances its security and reliability. However, for a production environment, you might want
|
||||
to consider additional security measures, such as using a non-root user to run the application inside
|
||||
the container1.
|
||||
|
||||
### Configuration:
|
||||
|
||||
Edit chat.conf and change variables. Example configuration for IRCNet:
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
openai
|
||||
pyshorteners
|
Loading…
Reference in New Issue