-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.env.yml
More file actions
27 lines (26 loc) · 2.96 KB
/
docker-compose.env.yml
File metadata and controls
27 lines (26 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
services:
aiapi:
image: aiapi
container_name: aiapi
build: .
restart: unless-stopped
environment:
# 使用 CONFIG_JSON 提供完整的配置(必须是单行)
- CONFlsIG_JSON={"login_service_urls":[{"name":"","url":""}],"listeners":[{"address":"0.0.0.0","port":5555,"https":false}],"db_clients":[{"name":"aichatpg","rdbms":"postgresql","host":"YOUR_DB_HOST","port":14539,"dbname":"aichat","user":"YOUR_DB_USER","passwd":"YOUR_DB_PASSWORD","is_fast":false,"number_of_connections":1,"timeout":-1.0,"auto_batch":false}],"app":{"number_of_threads":4,"enable_session":false,"session_timeout":0,"session_same_site":"Null","session_cookie_key":"JSESSIONID","session_max_age":-1,"document_root":"./","home_page":"index.html","use_implicit_page":true,"implicit_page":"index.html","upload_path":"uploads","file_types":["gif","png","jpg","js","css","html","ico","swf","xap","apk","cur","xml","webp","svg"],"mime":{},"locations":[{"default_content_type":"text/plain","alias":"","is_case_sensitive":false,"allow_all":true,"is_recursive":true,"filters":[]}],"max_connections":100000,"max_connections_per_ip":0,"load_dynamic_views":false,"dynamic_views_path":["./views"],"dynamic_views_output_path":"","json_parser_stack_limit":1000,"enable_unicode_escaping_in_json":true,"float_precision_in_json":{"precision":0,"precision_type":"significant"},"log":{"use_spdlog":true,"log_path":"logs","logfile_base_name":"aiapi","log_size_limit":10000000,"max_files":5,"log_level":"DEBUG","display_local_time":true},"run_as_daemon":false,"handle_sig_term":true,"relaunch_on_error":false,"use_sendfile":true,"use_gzip":true,"use_brotli":false,"static_files_cache_time":5,"idle_connection_timeout":60,"server_header_field":"","enable_server_header":true,"enable_date_header":true,"keepalive_requests":0,"pipelining_requests":0,"gzip_static":true,"br_static":true,"client_max_body_size":"1M","client_max_memory_body_size":"64K","client_max_websocket_message_size":"128K","reuse_port":false,"enabled_compressed_request":false,"enable_request_stream":false,"cors":{"enabled":true,"allow_origins":["*"],"allow_methods":["GET","POST","PUT","DELETE","OPTIONS","PATCH"],"allow_headers":["*"],"expose_headers":["*"],"max_age":3600,"allow_credentials":false}},"plugins":[{"name":"drogon::plugin::PromExporter","dependencies":[],"config":{"path":"/metrics"}},{"name":"drogon::plugin::AccessLogger","dependencies":[],"config":{"use_spdlog":true}}]}
- CUSTOM_CONFIG={"login_service_urls":[{"name":"chaynsapi","url":"http://aiapi-tool:5557/aichat/chayns/login"}],"regist_service_urls":[{"name":"chaynsapi","url":"http://aiapi-tool:5557/aichat/chayns/autoregister"}]}
ulimits:
core:
soft: -1
hard: -1
volumes:
- ./logs:/usr/aiapi/src/build/logs
- ./cores:/usr/aiapi/src/build/cores
ports:
- "5555:5555"
networks:
- aiapi_shared
# 使用 bridge 网络并对外暴露端口,可供公网访问
networks:
aiapi_shared:
external: true
name: aiapi_shared