Compare commits

...

10 Commits

Author SHA1 Message Date
han0
ed5e9330b9 fix:
All checks were successful
ci / build (push) Successful in 2m54s
2025-10-13 17:27:55 +08:00
han0
1fd05ee452 fix:
Some checks failed
ci / build (push) Failing after 10s
2025-10-13 17:25:26 +08:00
han0
80e14644d8 fix:
All checks were successful
ci / build (push) Successful in 1m48s
2025-10-13 17:05:22 +08:00
han0
2928113441 fix:
Some checks failed
ci / build (push) Failing after 1m59s
2025-10-13 16:59:49 +08:00
han0
4bd9a8e690 fix:
Some checks failed
ci / build (push) Failing after 2m45s
2025-10-13 16:47:43 +08:00
han0
5792660d88 fix:
Some checks failed
ci / build (push) Failing after 1m41s
2025-10-13 16:45:27 +08:00
han0
24323f2992 fix: ci
Some checks failed
ci / build (push) Failing after 27s
2025-10-13 16:20:07 +08:00
han0
28b1e67f48 fix: ci
Some checks failed
ci / build (push) Failing after 1m54s
2025-10-13 16:04:53 +08:00
han0
9b1a76d72f Merge remote-tracking branch 'gitea/test' into test
Some checks failed
ci / build (push) Has been cancelled
2025-10-13 15:44:26 +08:00
han0
6ebdc7dd9f fix: ci 2025-10-13 15:43:49 +08:00
4 changed files with 39 additions and 18 deletions

View File

@@ -21,12 +21,19 @@ jobs:
git clone --depth 1 "http://test:89085111dd6939710a992d6404bd61a50e420685@8.138.239.222:20300/${GITHUB_REPOSITORY}.git" .
git checkout "${GITHUB_SHA}"
# - uses: https://gitea.com/actions/setup-python@v5
# with:
# python-version: '3.7'
# cache: 'pip'
# # 如果有多个 requirements 文件:
# # cache-dependency-path: '**/requirements*.txt'
- name: Build
run: |
mkdir dist
PYTHONUSERBASE=$CI_PROJECT_DIR/home pip install --upgrade pip -i https://mirror.aliyun.com/pypi/simple --user
PYTHONUSERBASE=$CI_PROJECT_DIR/home pip install -r ./requirements.txt -i https://mirror.aliyun.com/pypi/simple --user
rsync -ha ./ ./dist --exclude=dist --exclude=.git --delete
PYTHONUSERBASE=./home pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple --user
PYTHONUSERBASE=./home pip install -r ./requirements.txt -i https://mirrors.aliyun.com/pypi/simple --user
- name: Deploy
run: |
@@ -37,12 +44,19 @@ jobs:
chmod 600 ~/.ssh/id_rsa
ssh -o StrictHostKeyChecking=no root@$DEPLOY_TEST_HOST_IP "mkdir -p $DEPLOY_PATH"
rsync -r ./dist/ ${DEPLOY_DEV_HOST_IP}:${DEPLOY_PATH} --delete
ssh ${SSH_OPTS} ${DEPLOY_DEV_HOST_IP} "cd ${DEPLOY_PATH} && source /etc/profile && docker-compose up -d --force-recreate"
ssh root@$DEPLOY_TEST_HOST_IP "rm -f $DEPLOY_PATH/*.jar"
scp ruoyi-admin/target/ruoyi-admin.jar root@$DEPLOY_TEST_HOST_IP:$DEPLOY_PATH/
ssh root@$DEPLOY_TEST_HOST_IP "mv $DEPLOY_PATH/ruoyi-admin.jar $DEPLOY_PATH/app.jar"
scp docker-compose.test.yml root@$DEPLOY_TEST_HOST_IP:$DEPLOY_PATH/
ssh root@$DEPLOY_TEST_HOST_IP "mv $DEPLOY_PATH/docker-compose.test.yml $DEPLOY_PATH/docker-compose.yml"
ssh root@$DEPLOY_TEST_HOST_IP "rm -rf $DEPLOY_PATH/**"
scp -r ./** root@$DEPLOY_TEST_HOST_IP:$DEPLOY_PATH/
ssh root@$DEPLOY_TEST_HOST_IP "cd $DEPLOY_PATH && docker compose up -d --force-recreate"
# ssh ${SSH_OPTS} ${DEPLOY_DEV_HOST_IP} "cd ${DEPLOY_PATH} && source /etc/profile && docker-compose up -d --force-recreate"
#
# rsync -ha ./ ./dist --exclude=dist --exclude=.git --delete
# rsync -r ./dist/ ${DEPLOY_DEV_HOST_IP}:${DEPLOY_PATH} --delete
# ssh ${SSH_OPTS} ${DEPLOY_DEV_HOST_IP} "cd ${DEPLOY_PATH} && source /etc/profile && docker-compose up -d --force-recreate"
#
# ssh root@$DEPLOY_TEST_HOST_IP "rm -f $DEPLOY_PATH/*.jar"
# scp ruoyi-admin/target/ruoyi-admin.jar root@$DEPLOY_TEST_HOST_IP:$DEPLOY_PATH/
# ssh root@$DEPLOY_TEST_HOST_IP "mv $DEPLOY_PATH/ruoyi-admin.jar $DEPLOY_PATH/app.jar"
# scp docker-compose.test.yml root@$DEPLOY_TEST_HOST_IP:$DEPLOY_PATH/
# ssh root@$DEPLOY_TEST_HOST_IP "mv $DEPLOY_PATH/docker-compose.test.yml $DEPLOY_PATH/docker-compose.yml"
# ssh root@$DEPLOY_TEST_HOST_IP "cd $DEPLOY_PATH && docker compose up -d --force-recreate"

View File

@@ -1,8 +1,8 @@
version: '2.1'
services:
www:
image: python:3.7.16-material-api
build: ./docker
container_name: material-api
image: python:3.7.16
restart: always
environment:
- SERVICE_NAME=material-api
@@ -16,7 +16,13 @@ services:
- ./web:/usr/src/app
- ./home:/root/.local
- ./logs:/logs
- /opt/files/material_api:/usr/src/app/files
- ./files:/usr/src/app/files
working_dir: /usr/src/app/
ports:
- 7072:7072
networks:
- server
networks:
server:
external: true

View File

@@ -3,6 +3,7 @@
#git+http://oauth2:4VGjs7rFL9fz8EwR1x6g@192.168.1.3:8929/jgy_xxs/nc_http.git
#git+http://oauth2:4VGjs7rFL9fz8EwR1x6g@gitlab:8929/jgy_xxs/nc_http.git
#nc_http>=0.0.1.dev54
git+http://test:89085111dd6939710a992d6404bd61a50e420685@8.138.239.222:20300/root/nc_http.git
Flask>=2.0.3
Flask-SQLAlchemy>=2.4.4

View File

@@ -32,7 +32,7 @@ HTTPS_BASE_URL = os.getenv('HTTPS_BASE_URL', '')
# 数据库
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8' # oracle client 编码
SQLALCHEMY_DATABASE_URI = 'mysql+mysqlconnector://root:Xxs123456@192.168.1.3:4306/material_manage?charset=utf8mb4&auth_plugin=mysql_native_password'
SQLALCHEMY_DATABASE_URI = 'mysql+mysqlconnector://root:XKKFB123456!@mysql:3306/material_manage?charset=utf8mb4&auth_plugin=mysql_native_password'
SQLALCHEMY_TRACK_MODIFICATIONS = False # 设置是否跟踪数据库的修改情况,一般不跟踪
SQLALCHEMY_ECHO = True # 数据库操作时是否显示原始SQL语句一般打开后台要日志
SQLALCHEMY_BINDS = {
@@ -44,10 +44,10 @@ SQLALCHEMY_POOL_RECYCLE = 10 * 60 # 空闲该时间后回收数据库连接
ES_HOSTS = os.getenv('ES_HOSTS', 'http://192.168.137.1:9200')
# Redis
REDIS_HOST = os.getenv('REDIS_HOST', '192.168.137.1')
REDIS_HOST = os.getenv('REDIS_HOST', 'redis')
REDIS_PORT = int(os.getenv('REDIS_PORT', '6379'))
REDIS_PASSWORD = os.getenv('REDIS_PASSWORD', '')
REDIS_DB = int(os.getenv('REDIS_DATABASE', '1'))
REDIS_PASSWORD = os.getenv('REDIS_PASSWORD', 'Xxs123456')
REDIS_DB = int(os.getenv('REDIS_DATABASE', '4'))
# Celery
CELERY_BROKER_URL = 'redis://{}{}:{}/{}'.format(