Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the version of Werkzeug. #60

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .env.example

This file was deleted.

9 changes: 9 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git/

!config/config.yml
!config/ssl/ca-cert.crt
!config/ssl/client-cert.pem
!config/ssl/client-key.pem
!config/ssl/server-ca.pem
!config/ssl/ssl-cert.crt
!config/ssl/ssl-key.key
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ web_modules/
.env
.env.test

# config yml file
config/config.yml

# ssl setting files
config/ssl/*

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
Expand All @@ -92,12 +98,18 @@ dist
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

*.pyc

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# Testing notebook
.ipynb_checkpoints/
*.ipynb

# FuseBox cache
.fusebox/

Expand All @@ -117,4 +129,3 @@ dist
.yarn/install-state.gz
.pnp.*


9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM python:3.9-alpine
FROM python:3.12

ENV PYTHONUNBUFFERED True

COPY ./ /ChatGPT-Line-Bot
WORKDIR /ChatGPT-Line-Bot

RUN find . -name "*.ipynb" -exec rm {} +
RUN apt-get install libpq-dev
RUN pip3 install -r requirements.txt

CMD ["python3", "main.py"]
# CMD ["python3", "main.py"]
CMD nohup gunicorn -w 4 main:app --access-logfile /var/log/gunicorn_access.txt --error-logfile /var/log/gunicorn_error.txt -b :8080 --timeout 120
25 changes: 25 additions & 0 deletions config/config.yml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
line:
channel_access_token:
channel_secret:

openai:
api_key:
assistant_id:

db:
host:
port: 5432
db_name:
user:
password:
sslmode:
sslrootcert:
sslcert:
sslkey:

logfile: ./logs/linebot.log

commands:
help: "這裡是台南市議會聊天機器人,目前已經輸入了台南市議會第四屆公開議事錄中的會議逐字稿,請輸入您的問題,以便我檢索逐字稿內容來回應您。若您希望重設聊天內容,請輸入「/reset」以重置聊天。"
...
Loading