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

增加command+动态生成bot #6

Merged
merged 33 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f7f5934
feat: init server code and deploy script
lloydzhou Dec 28, 2023
d37593f
feat: init server code and deploy script.
lloydzhou Dec 28, 2023
bb06549
Merge remote-tracking branch 'origin/feature-lloyd' into feature-lloyd
lloydzhou Dec 28, 2023
7634e23
add package by pdm
lloydzhou Dec 28, 2023
c9bc52e
feat: update
lloydzhou Dec 28, 2023
d155e8a
feat: add session
lloydzhou Dec 28, 2023
45602e9
feat: add model
lloydzhou Dec 28, 2023
31c2f43
feat: add model
lloydzhou Dec 28, 2023
112759b
feat: update config
lloydzhou Dec 28, 2023
8d24f5f
feat: update config
lloydzhou Dec 28, 2023
034790b
feat: hotfix
lloydzhou Dec 28, 2023
e0378ab
feat: hotfix
lloydzhou Dec 28, 2023
dc46616
feat: hotfix
lloydzhou Dec 28, 2023
96d5b7d
feat: add mysql schema
lloydzhou Dec 29, 2023
5a74fe8
feat: add create command
lloydzhou Dec 29, 2023
7b2d23e
merge code
lloydzhou Dec 29, 2023
24264d6
Merge remote-tracking branch 'origin/main' into feature-lloyd
lloydzhou Dec 29, 2023
c4e66c2
add command
lloydzhou Dec 29, 2023
c736830
Merge remote-tracking branch 'origin/main' into feature-lloyd
lloydzhou Dec 29, 2023
231455b
add command
lloydzhou Dec 29, 2023
8556c3d
add missing file
lloydzhou Dec 29, 2023
134c1e6
update ca-lark-sdk
lloydzhou Dec 29, 2023
a93d976
hotfix
lloydzhou Dec 29, 2023
23aeefc
hotfix
lloydzhou Dec 29, 2023
1aefd34
hotfix
lloydzhou Dec 29, 2023
e58a1e9
update version
lloydzhou Dec 29, 2023
369e687
update
lloydzhou Dec 29, 2023
4b98660
add celery task
lloydzhou Dec 29, 2023
ecd0b1d
add celery task
lloydzhou Dec 29, 2023
e567528
remove rabbitmq
lloydzhou Dec 29, 2023
726b751
update
lloydzhou Dec 29, 2023
c91dafe
add auth
lloydzhou Dec 29, 2023
a8a86f5
add auth
lloydzhou Dec 29, 2023
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
3 changes: 1 addition & 2 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM python:3.10-bookworm

RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list
RUN sed -i "s@http://security.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list
RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list.d/debian.sources
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

ADD ./requirements.txt /tmp/requirements.txt
Expand Down
32 changes: 13 additions & 19 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
version: '2'
services:
gitmaya:
restart: always
worker:
image: gitmaya
volumes:
- .env:/server/.env
command: celery -A tasks.celery worker -l DEBUG -c 2

beat:
extends: worker
command: celery -A tasks.celery beat -l DEBUG

gitmaya:
extends: worker
ports:
- "8888"
environment:
Expand All @@ -15,22 +22,9 @@ services:
image: redis:alpine
ports:
- "6379"

rabbitmq:
restart: always
image: rabbitmq:3.7-management-alpine
environment:
RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLNMEQG"
RABBITMQ_DEFAULT_USER: "rabbitmq"
RABBITMQ_DEFAULT_PASS: "rabbitmq"
RABBITMQ_DEFAULT_VHOST: "/"
VIRTUAL_HOST: rabbitmq.gitmaya.com
VIRTUAL_PORT: 15672
ports:
- "15672"
- "5672"
volumes:
- ./data/rabbitmq:/data/mnesia
- ./data/redis:/data
command: redis-server --save 20 1 --loglevel warning

mysql:
restart: always
Expand All @@ -39,8 +33,8 @@ services:
- ./data/mysql/data:/var/lib/mysql
- ./data/mysql/conf.d:/etc/mysql/conf.d
environment:
MYSQL_ROOT_PASSWORD: 'gitmaya'
MYSQL_DATABASE: 'gitmaya2023'
MYSQL_ROOT_PASSWORD: 'gitmaya2023'
MYSQL_DATABASE: 'gitmaya'
TZ: 'Asia/Shanghai'
ports:
- "3306"
Expand Down
176 changes: 169 additions & 7 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ authors = [
dependencies = [
"python-dotenv>=1.0.0",
"ca-lark-oauth==0.0.5",
"ca-lark-webhook>=0.0.3",
"ca-lark-webhook==0.0.4",
"flask-sqlalchemy>=3.1.1",
"flask-cors>=4.0.0",
"pymysql>=1.1.0",
"click>=8.1.7",
"bson>=0.5.10",
"jwt>=1.3.1",
"urllib3>=2.1.0",
"ca-lark-sdk>=0.0.8",
"celery>=5.3.6",
"redis>=5.0.1",
]
requires-python = ">=3.10"
readme = "README.md"
Expand Down
17 changes: 15 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# This file is @generated by PDM.
# Please do not edit it manually.

amqp==5.2.0
anyio==4.2.0
async-timeout==4.0.3; python_full_version <= "3.11.2"
billiard==4.2.0
blinker==1.7.0
bson==0.5.10
ca-lark-oauth==0.0.5
ca-lark-sdk==0.0.7
ca-lark-webhook==0.0.3
ca-lark-sdk==0.0.8
ca-lark-webhook==0.0.4
celery==5.3.6
certifi==2023.11.17
cffi==1.16.0
click==8.1.7
click-didyoumean==0.3.0
click-plugins==1.1.1
click-repl==0.3.0
colorama==0.4.6; platform_system == "Windows"
cryptography==41.0.7
exceptiongroup==1.2.0; python_version < "3.11"
Expand All @@ -24,15 +31,21 @@ idna==3.6
itsdangerous==2.1.2
Jinja2==3.1.2
jwt==1.3.1
kombu==5.3.4
MarkupSafe==2.1.3
prompt-toolkit==3.0.43
pycparser==2.21
pycryptodome==3.19.1
pymysql==1.1.0
python-dateutil==2.8.2
python-dotenv==1.0.0
redis==5.0.1
six==1.16.0
sniffio==1.3.0
sqlalchemy==2.0.23
typing-extensions==4.9.0
tzdata==2023.3
urllib3==2.1.0
vine==5.1.0
wcwidth==0.2.12
Werkzeug==3.0.1
Loading