@@ -13,7 +13,7 @@ jobs:
|
||||
build:
|
||||
|
||||
container:
|
||||
image: python:3.7.17
|
||||
image: python:3.7.16
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@@ -1,7 +1,8 @@
|
||||
version: '2.1'
|
||||
services:
|
||||
www:
|
||||
image: python:3.7.17
|
||||
container_name: material-api
|
||||
image: python:3.7.16
|
||||
restart: always
|
||||
environment:
|
||||
- SERVICE_NAME=material-api
|
||||
@@ -19,3 +20,9 @@ services:
|
||||
working_dir: /usr/src/app/
|
||||
ports:
|
||||
- 7072:7072
|
||||
networks:
|
||||
- server
|
||||
|
||||
networks:
|
||||
server:
|
||||
external: true
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user