Merge pull request '整理配置文件和脚本细节' (#49) from standalone_develop into trustie_server

This commit is contained in:
xxq250 2023-05-10 14:38:04 +08:00
commit 4741a50b9e
4 changed files with 72 additions and 113 deletions

View File

@ -116,7 +116,8 @@ class RepositoriesController < ApplicationController
result = interactor.result
@sub_entries = result.is_a?(Array) ? result.sort_by{ |hash| hash['type'] } : result
else
render_error(interactor.error)
status = interactor.error == "你访问的文件不存在"? -2 : -1
render_error(interactor.error,status)
end
end
end

View File

@ -1,33 +1,5 @@
default: &default
# 用户登入的时候设置/登出的时候清空
autologin_cookie_name: 'autologin_gitlink'
platform_url: 'http://localhost:3000'
sign_key: ''
#附件上传路径
attachment_folder: '/tmp'
# webssh相关
tomcat_webssh: 'https://testwebssh.gitlink.org.cn'
webssh_username: ''
webssh_password: ''
# git服务地址
git_address_ip: ''
#新版git服务地址
git_address_domain: ''
# git管理员用户名问题, 适用于git客户端的操作
git_username: ''
git_password: ''
ucloud:
public_key: ''
private_key: ''
public_bucket: ''
public_bucket_host: ''
public_cdn_host: ''
oauth:
qq:
appid: 'test'
@ -45,10 +17,10 @@ default: &default
callback_url: 'callback_url'
signature_key: 'test12345678'
educoder:
client_id: 'e9ce4d5ba1698d6f7d01d8ee2959776c7a6d743ebe94da2341e288fd2fbf60aa'
client_secret: '6ff84dd75eddd859c5bd0e7a791b58bc5ad1ba4fbb30bc9db37cb0baf9f33012'
base_url: 'https://test-data.educoder.net'
redirect_uri: 'https://testforgeplus.trustie.net/api/auth/educoder/callback'
client_id: 'test'
client_secret: 'test123456'
base_url: 'https://test.a.com'
redirect_uri: 'https://test.a.com/api/auth/educoder/callback'
gitea:
access_key_id: ''
@ -73,7 +45,8 @@ default: &default
trace:
domain: ''
base_url: ''
cookie_domain: '.gitlink.org.cn'
view_domain: 'https://cjn.gitlink.org.cn'
forum:
domain: ''
base_url: '/api'
@ -83,26 +56,10 @@ default: &default
production:
<<: *default
# 中间层地址
cloud_bridge: ''
cloud_tomcat_php: ''
bridge_secret_key: ''
cookie_domain: '.gitlink.org.cn'
attachment_folder: ''
host_name: 'https://testeduplus2.gitlink.org.cn'
old_edu_host: 'http://testbdweb.gitlink.org.cn'
development:
<<: *default
cloud_bridge: ''
cloud_tomcat_php: ''
host_name: ''
old_edu_host: ''
test:
<<: *default
cloud_tomcat_php: 'http://10.9.63.225'
host_name: 'https://testeduplus2.gitlink.org.cn'
old_edu_host: 'http://testbdweb.gitlink.org.cn'

View File

@ -1,61 +1,62 @@
# MySQL. Versions 5.1.10 and up are supported.
#
# Install the MySQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
#
default: &default
adapter: mysql2
host: 127.0.0.1
encoding: utf8
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root
password: 123456
# socket: /var/run/mysqld/mysqld.sock
gitea_server:
adapter: mysql2
database: gitea_development
host: 127.0.0.1
username: root
password: "123456"
encoding: utf8
development:
<<: *default
host: 127.0.0.1
database: forge_development
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: forge_test
# As with config/secrets.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
# ever seen by anyone, they now have access to your database.
#
# Instead, provide the password as a unix environment variable when you boot
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
# for a full rundown on how to provide these environment variables in a
# production deployment.
#
# On Heroku and other platform providers, you may have a full connection URL
# available as an environment variable. For example:
#
# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
#
# You can use this database configuration with:
#
# production:
# url: <%= ENV['DATABASE_URL'] %>
#
production:
<<: *default
database: forge_production
# MySQL. Versions 5.1.10 and up are supported.
#
# Install the MySQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
#
default: &default
adapter: mysql2
host: 127.0.0.1
encoding: utf8mb4
reconnect: true
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root
password: 123456
# socket: /var/run/mysqld/mysqld.sock
gitea_server:
adapter: mysql2
database: gitea_development
host: 127.0.0.1
username: root
password: "123456"
encoding: utf8
development:
<<: *default
host: 127.0.0.1
database: forge_development
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: forge_test
# As with config/secrets.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
# ever seen by anyone, they now have access to your database.
#
# Instead, provide the password as a unix environment variable when you boot
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
# for a full rundown on how to provide these environment variables in a
# production deployment.
#
# On Heroku and other platform providers, you may have a full connection URL
# available as an environment variable. For example:
#
# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
#
# You can use this database configuration with:
#
# production:
# url: <%= ENV['DATABASE_URL'] %>
#
production:
<<: *default
database: forge_production

View File

@ -11,6 +11,6 @@ class UpdatePullRequestUtfName < ActiveRecord::Migration[5.2]
execute("ALTER TABLE `versions` MODIFY `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
execute("ALTER TABLE `issue_tags` MODIFY `name` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
execute("ALTER TABLE `issue_tags` MODIFY `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
execute("ALTER TABLE `projects_activity` MODIFY `project_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
# execute("ALTER TABLE `projects_activity` MODIFY `project_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
end
end