1
0

fix: 更新Docker构建脚本

This commit is contained in:
TsMask
2025-05-20 18:47:08 +08:00
parent ac23c3a9f1
commit 46bc90c2e4
8 changed files with 128 additions and 54 deletions

View File

@@ -17,16 +17,19 @@ chmod -R g+rwX "$BASE_DIR" "$DATA_DIR"
cp -rf /usr/local/etc/omc/default/* "$BASE_DIR"
# OMC config
sed -i 's/port: 33030/port: $API_HTTP_PORT/' "$BASE_DIR"/omc.yaml
sed -i 's/port: 33443/port: $API_HTTPS_PORT/' "$BASE_DIR"/omc.yaml
sed -i "s/port: 33030/port: $API_HTTP_PORT/" "$BASE_DIR"/omc.yaml
sed -i "s/port: 33443/port: $API_HTTPS_PORT/" "$BASE_DIR"/omc.yaml
sed -i '/webServer:/,/-/s/^\( *enabled:\) true/\1 false/' "$BASE_DIR"/omc.yaml
sed -i '/type: "mysql"/,/-/s/^\( *host:\) "127.0.0.1"/\1 "omc_mariadb"/' "$BASE_DIR"/omc.yaml
sed -i 's/port: 33066/port: 3306/' "$BASE_DIR"/omc.yaml
sed -i '/port: 6379 # Redis port/,/-/s/^\( *host:\) "127.0.0.1"/\1 "omc_keydb"/' "$BASE_DIR"/omc.yaml
# Nginx config
sed -i 's/# gzip_/gzip_/' /etc/nginx/nginx.conf
sed -i 's/include \/etc\/nginx\/sites-enabled/# include \/etc\/nginx\/sites-enabled/' /etc/nginx/nginx.conf
cp -rf /usr/local/etc/omc/nginx/omc.conf /etc/nginx/conf.d
touch /usr/local/etc/omc/web/dist/config.js && echo 'sessionStorage.clear()' | tee /web/dist/config.js
sed -i 's/33030;/$API_HTTP_PORT;/' /etc/nginx/conf.d/omc.conf
sed -i 's/33443;/$API_HTTPS_PORT;/' /etc/nginx/conf.d/omc.conf
sed -i 's/80;/$WEB_HTTP_PORT;/' /etc/nginx/conf.d/omc.conf
sed -i 's/443;/$WEB_HTTPS_PORT;/' /etc/nginx/conf.d/omc.conf
sed -i "s/33030;/$API_HTTP_PORT;/" /etc/nginx/conf.d/omc.conf
sed -i "s/33443;/$API_HTTPS_PORT;/" /etc/nginx/conf.d/omc.conf
sed -i "s/80;/$WEB_HTTP_PORT;/" /etc/nginx/conf.d/omc.conf
sed -i "s/443;/$WEB_HTTPS_PORT;/" /etc/nginx/conf.d/omc.conf