1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00

Compare commits

..

No commits in common. "master" and "v2.9.6" have entirely different histories.

383 changed files with 22538 additions and 1822 deletions

9
.gitignore vendored
View File

@ -1,12 +1,9 @@
src/binpack_usr.go
src/binpack.go
src/version.go
etc/local.shy
etc/local.sh
etc/
bin/
var/
usr/
usr/local/export/
go.work.sum
go.work
tags
.*

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2017-2025 shylinux
Copyright (c) 2020 码神
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,12 +1,22 @@
publish = usr/publish
binarys = bin/ice.bin
option = src/option.go
version = src/version.go
flags = -ldflags "-w -s" -v
binpack = src/binpack.go
all: def
@date +"%Y-%m-%d %H:%M:%S"
go build ${flags} -o ${binarys} src/main.go ${option} ${version} && ./${binarys} forever restart &>/dev/null
go build -v -o ${binarys} src/main.go ${version} ${binpack} && ./${binarys} forever restart &>/dev/null
app: def
CGO_ENABLED=1 go build -v -o ${publish}/contexts.app/Contents/MacOS/contexts src/webview.go ${version} ${binpack} && ./${binarys} forever restart &>/dev/null
# hdiutil create ${publish}/tmp.dmg -ov -volname "ContextsInstall" -fs HFS+ -srcfolder "${publish}/contexts.app"
# rm -f ${publish}/ContextsInstall.dmg
# hdiutil convert ${publish}/tmp.dmg -format UDZO -o ${publish}/ContextsInstall.dmg
%: src/%.go def
@date +"%Y-%m-%d %H:%M:%S"
go build -v -o ${publish}/$@ src/$@.go ${version} && chmod u+x ${publish}/$@
def:
@[ -f ${option} ] || echo "package main">${option}
@[ -f ${version} ] || echo "package main">${version}
@[ -f ${binpack} ] || echo "package main">${binpack}

View File

@ -1,17 +1,7 @@
# ContextOS
ContextOS 通过集群化、模块化、自动化的方式,用一个 20M 大小的程序文件,就可以在各种设备上,一键启动完整的云计算服务与云研发环境
# contexts
contexts 通过集群化、模块化、自动化的方式,用一个 20M 的程序文件,就可以在各种设备上,一键搭起完整的云计算与云研发服务
## 安装系统
### 下载编译
## 安装项目
```sh
git clone https://shylinux.com/x/ContextOS
cd ContextOS; source etc/miss.sh
temp=$(mktemp); if curl -h &>/dev/null; then curl -o $temp -fsSL https://shylinux.com; else wget -O $temp -q https://shylinux.com; fi; source $temp binary
```
### 启动服务
```sh
ish_miss_serve
```
### 管理后台
打开管理后台 [http://localhost:9020](http://localhost:9020)

View File

@ -1,28 +0,0 @@
2016-ContextOS 9020 username "shy" usernick "码神" language "zh-cn" avatar "usr/icons/avatar.jpg"
20230511-nginx-story repos "https://shylinux.com/x/nginx-story" binary ""
20230511-linux-story repos "https://shylinux.com/x/linux-story" binary ""
2025-ContextOS 9050 repos "https://shylinux.com/x/ContextOS" binary ""
20250208-ollama-story repos "https://shylinux.com/x/ollama-story" binary ""
20250205-web repos "https://2025.shylinux.com/x/20250205-web" binary ""
20250205-pod repos "https://2025.shylinux.com/x/20250205-pod" binary ""
20250205-git repos "https://2025.shylinux.com/x/20250205-git" binary ""
20250205-dev repos "https://2025.shylinux.com/x/20250205-dev" binary ""
20250203-bbs repos "https://2025.shylinux.com/x/20250203-bbs" binary ""
20250117-support repos "https://shylinux.com/x/support" binary ""
20250117-foundation repos "https://shylinux.com/x/foundation" binary ""
2024-ContextOS 9040 repos "https://shylinux.com/x/ContextOS" binary ""
20240903-operation repos "https://shylinux.com/x/operation" binary ""
20240724-enterprise repos "https://shylinux.com/x/enterprise" binary ""
20240724-education repos "https://shylinux.com/x/education" binary ""
20240724-community repos "https://shylinux.com/x/community" binary ""
20240713-guangdong repos "https://2024.shylinux.com/x/guangdong" binary ""
20240705-shandong repos "https://2024.shylinux.com/x/shandong" binary ""
2023-ContextOS 9030 repos "https://shylinux.com/x/ContextOS" binary ""
20230913-matrix-story repos "https://shylinux.com/x/matrix-story" binary ""
20230511-redis-story repos "https://shylinux.com/x/redis-story" binary ""
20230511-nginx-story repos "https://shylinux.com/x/nginx-story" binary ""
20230511-mysql-story repos "https://shylinux.com/x/mysql-story" binary ""
20230511-linux-story repos "https://shylinux.com/x/linux-story" binary ""
20230511-golang-story repos "https://shylinux.com/x/golang-story" binary ""
20230511-docker-story repos "https://shylinux.com/x/docker-story" binary ""
20210308-sshd repos "https://shylinux.com/x/sshd" binary ""

View File

@ -1,9 +0,0 @@
2023-ContextOS 9030 username "shy" usernick "IT 老营长" language "zh-cn" avatar "usr/icons/avatar.jpg"
20230913-matrix-story repos "https://shylinux.com/x/matrix-story" binary ""
20230511-redis-story repos "https://shylinux.com/x/redis-story" binary ""
20230511-nginx-story repos "https://shylinux.com/x/nginx-story" binary ""
20230511-mysql-story repos "https://shylinux.com/x/mysql-story" binary ""
20230511-linux-story repos "https://shylinux.com/x/linux-story" binary ""
20230511-golang-story repos "https://shylinux.com/x/golang-story" binary ""
20230511-docker-story repos "https://shylinux.com/x/docker-story" binary ""
20210308-sshd repos "https://shylinux.com/x/sshd" binary ""

View File

@ -1,39 +0,0 @@
2024-ContextOS 9040 username "shy" usernick "IT 老营长" language "zh-cn" avatar "usr/icons/avatar.jpg"
20240903-operation repos "https://shylinux.com/x/operation" binary ""
20240724-enterprise repos "https://shylinux.com/x/enterprise" binary ""
20240724-education repos "https://shylinux.com/x/education" binary ""
20240724-community repos "https://shylinux.com/x/community" binary ""
20240713-guangdong repos "https://2024.shylinux.com/x/guangdong" binary ""
20240705-shandong repos "https://2024.shylinux.com/x/shandong" binary ""
2024-yunxuanlinghang 9046 repos "https://2024-guangdong.shylinux.com/x/yunxuanlinghang" binary ""
20240903-operation repos "https://shylinux.com/x/operation" binary "https://2024.shylinux.com/s/20240903-operation"
20240724-enterprise repos "https://shylinux.com/x/enterprise" binary "https://2024.shylinux.com/s/20240724-enterprise"
20240724-education repos "https://shylinux.com/x/education" binary "https://2024.shylinux.com/s/20240724-education"
20240724-community repos "https://shylinux.com/x/community" binary "https://2024.shylinux.com/s/20240724-community"
20230913-matrix-story repos "https://shylinux.com/x/matrix-story" binary "https://2023.shylinux.com/s/20230913-matrix-story"
20230511-redis-story repos "https://shylinux.com/x/redis-story" binary "https://2023.shylinux.com/s/20230511-redis-story"
20230511-nginx-story repos "https://shylinux.com/x/nginx-story" binary "https://2023.shylinux.com/s/20230511-nginx-story"
20230511-mysql-story repos "https://shylinux.com/x/mysql-story" binary "https://2024.shylinux.com/s/20230511-mysql-story"
20230511-linux-story repos "https://shylinux.com/x/linux-story" binary "https://2023.shylinux.com/s/20230511-linux-story"
20230511-golang-story repos "https://shylinux.com/x/golang-story" binary "https://2023.shylinux.com/s/20230511-golang-story"
20230511-docker-story repos "https://shylinux.com/x/docker-story" binary "https://2023.shylinux.com/s/20230511-docker-story"
20210308-sshd repos "https://shylinux.com/x/sshd" binary "https://2023.shylinux.com/s/20210308-sshd"
2024-jingganjiaoyu 9045 repos "https://2024-shandong.shylinux.com/x/jingganjiaoyu" binary ""
20240903-operation repos "https://shylinux.com/x/operation" binary "https://2024.shylinux.com/s/20240903-operation"
20240724-enterprise repos "https://shylinux.com/x/enterprise" binary "https://2024.shylinux.com/s/20240724-enterprise"
20240724-education repos "https://shylinux.com/x/education" binary "https://2024.shylinux.com/s/20240724-education"
20240724-community repos "https://shylinux.com/x/community" binary "https://2024.shylinux.com/s/20240724-community"
20230913-matrix-story repos "https://shylinux.com/x/matrix-story" binary "https://2023.shylinux.com/s/20230913-matrix-story"
20230511-redis-story repos "https://shylinux.com/x/redis-story" binary "https://2023.shylinux.com/s/20230511-redis-story"
20230511-nginx-story repos "https://shylinux.com/x/nginx-story" binary "https://2023.shylinux.com/s/20230511-nginx-story"
20230511-mysql-story repos "https://shylinux.com/x/mysql-story" binary "https://2024.shylinux.com/s/20230511-mysql-story"
20230511-linux-story repos "https://shylinux.com/x/linux-story" binary "https://2023.shylinux.com/s/20230511-linux-story"
20230511-golang-story repos "https://shylinux.com/x/golang-story" binary "https://2023.shylinux.com/s/20230511-golang-story"
20230511-docker-story repos "https://shylinux.com/x/docker-story" binary "https://2023.shylinux.com/s/20230511-docker-story"
20210308-sshd repos "https://shylinux.com/x/sshd" binary "https://2023.shylinux.com/s/20210308-sshd"
2024-zelinqiche 9044 repos "https://2024-guangdong.shylinux.com/x/zelinqiche" binary ""
20240718-hi repos "" binary ""
2024-laoshaojiaju 9043 repos "https://2024-shandong.shylinux.com/x/laoshaojiaju" binary ""
20240816-hi repos "" binary ""
2024-guangdong 9042 repos "https://2024.shylinux.com/x/guangdong" binary ""
2024-shandong 9041 repos "https://2024.shylinux.com/x/shandong" binary ""

View File

@ -1,31 +0,0 @@
2025-ContextOS 9050 username "shy" usernick "IT 老营长" language "zh-cn" avatar "usr/icons/avatar.jpg"
20250208-ollama-story repos "https://shylinux.com/x/ollama-story" binary ""
20250205-web repos "https://2025.shylinux.com/x/20250205-web" binary ""
20250205-pod repos "https://2025.shylinux.com/x/20250205-pod" binary ""
20250205-git repos "https://2025.shylinux.com/x/20250205-git" binary ""
20250205-dev repos "https://2025.shylinux.com/x/20250205-dev" binary ""
20250203-bbs repos "https://2025.shylinux.com/x/20250203-bbs" binary ""
20250117-support repos "https://shylinux.com/x/support" binary ""
20250117-foundation repos "https://shylinux.com/x/foundation" binary ""
2025-web 9057 repos "https://2025.shylinux.com/x/20250205-web" binary ""
20250213-founder repos "https://shylinux.com/x/founder" binary ""
20250213-compose repos "https://shylinux.com/x/compose" binary ""
20250211-service repos "https://2025-dev.shylinux.com/x/20250211-service" binary ""
20240903-operation repos "https://shylinux.com/x/operation" binary "https://2024.shylinux.com/s/20240903-operation"
20240724-enterprise repos "https://shylinux.com/x/enterprise" binary "https://2024.shylinux.com/s/20240724-enterprise"
20240724-education repos "https://shylinux.com/x/education" binary "https://2024.shylinux.com/s/20240724-education"
20240724-community repos "https://shylinux.com/x/community" binary "https://2024.shylinux.com/s/20240724-community"
20230511-mysql-story repos "https://shylinux.com/x/mysql-story" binary "https://2023.shylinux.com/s/20230511-mysql-story"
20230511-docker-story repos "https://shylinux.com/x/docker-story" binary "https://2023.shylinux.com/s/20230511-docker-story"
2025-pod 9056 repos "https://2025.shylinux.com/x/20250205-pod" binary ""
20250205-hi repos "" binary ""
2025-git 9055 repos "https://2025.shylinux.com/x/20250205-git" binary ""
20250205-hi repos "" binary ""
2025-dev 9054 repos "https://2025.shylinux.com/x/20250205-dev" binary ""
20250213-machine repos "https://2025-dev.shylinux.com/x/20250213-machine" binary ""
20250211-service repos "https://2025-dev.shylinux.com/x/20250211-service" binary ""
20230511-docker-story repos "https://shylinux.com/x/docker-story" binary "https://2023.shylinux.com/s/20230511-docker-story"
2025-bbs 9053 repos "https://2025.shylinux.com/x/20250203-bbs" binary ""
20230511-linux-story repos "https://shylinux.com/x/linux-story" binary "https://2023.shylinux.com/s/20230511-linux-story"
2025-foundation 9052 repos "https://shylinux.com/x/foundation" binary ""
2025-support 9051 repos "https://shylinux.com/x/support" binary ""

75
etc/conf/Pro.terminal Normal file
View File

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BackgroundBlur</key>
<real>0.10000000000000001</real>
<key>BackgroundColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxAREldO
U1doaXRlXE5TQ29sb3JTcGFjZVYkY2xhc3NGMCAwLjYAEAOAAtIUFRYXWiRjbGFzc25h
bWVYJGNsYXNzZXNXTlNDb2xvcqIWGFhOU09iamVjdAgRGiQpMjdJTFFTV11kbHmAh4mL
kJukrK8AAAAAAAABAQAAAAAAAAAZAAAAAAAAAAAAAAAAAAAAuA==
</data>
<key>CursorColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxAREldO
U1doaXRlXE5TQ29sb3JTcGFjZVYkY2xhc3NLMC4zMDI0MTkzNgAQA4AC0hQVFhdaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohYYWE5TT2JqZWN0CBEaJCkyN0lMUVNXXWRs
eYCMjpCVoKmxtAAAAAAAAAEBAAAAAAAAABkAAAAAAAAAAAAAAAAAAAC9
</data>
<key>Font</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGkCwwVFlUkbnVsbNQNDg8QERIT
FFZOU1NpemVYTlNmRmxhZ3NWTlNOYW1lViRjbGFzcyNAMAAAAAAAABAQgAKAA1ZNb25h
Y2/SFxgZGlokY2xhc3NuYW1lWCRjbGFzc2VzVk5TRm9udKIZG1hOU09iamVjdAgRGiQp
MjdJTFFTWF5nbnd+hY6QkpSboKu0u74AAAAAAAABAQAAAAAAAAAcAAAAAAAAAAAAAAAA
AAAAxw==
</data>
<key>FontAntialias</key>
<false/>
<key>FontWidthSpacing</key>
<real>0.99596774193548387</real>
<key>ProfileCurrentVersion</key>
<real>2.0699999999999998</real>
<key>SelectionColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxAREldO
U1doaXRlXE5TQ29sb3JTcGFjZVYkY2xhc3NLMC4yNTQwMzIyNQAQA4AC0hQVFhdaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohYYWE5TT2JqZWN0CBEaJCkyN0lMUVNXXWRs
eYCMjpCVoKmxtAAAAAAAAAEBAAAAAAAAABkAAAAAAAAAAAAAAAAAAAC9
</data>
<key>ShowWindowSettingsNameInTitle</key>
<false/>
<key>TextBoldColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxAREldO
U1doaXRlXE5TQ29sb3JTcGFjZVYkY2xhc3NCMQAQA4AC0hQVFhdaJGNsYXNzbmFtZVgk
Y2xhc3Nlc1dOU0NvbG9yohYYWE5TT2JqZWN0CBEaJCkyN0lMUVNXXWRseYCDhYeMl6Co
qwAAAAAAAAEBAAAAAAAAABkAAAAAAAAAAAAAAAAAAAC0
</data>
<key>TextColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGjCwwTVSRudWxs0w0ODxAREldO
U1doaXRlXE5TQ29sb3JTcGFjZVYkY2xhc3NLMC45NDc1ODA2NAAQA4AC0hQVFhdaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohYYWE5TT2JqZWN0CBEaJCkyN0lMUVNXXWRs
eYCMjpCVoKmxtAAAAAAAAAEBAAAAAAAAABkAAAAAAAAAAAAAAAAAAAC9
</data>
<key>columnCount</key>
<integer>127</integer>
<key>name</key>
<string>Pro 1</string>
<key>rowCount</key>
<integer>36</integer>
<key>shellExitAction</key>
<integer>0</integer>
<key>type</key>
<string>Window Settings</string>
</dict>
</plist>

27
etc/conf/bash_local.sh Normal file
View File

@ -0,0 +1,27 @@
#!/bin/sh
export CGO_ENABLED=0
export LC_ALL=en_US.UTF-8
export BASH_SILENCE_DEPRECATION_WARNING=1
touch ~/.hushlogin
export GOPROXY=https://goproxy.cn
export GOPRIVATE=shylinux.com
export CTX_ROOT=${CTX_ROOT:=~/contexts}
[ "$PWD" = "$HOME" ] && cd ~/contexts
[ "$PWD" = "/" ] && cd ~/contexts
if uname -s|grep -v MINGW &>/dev/null; then
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
fi
ish_sys_path_load
ish_sys_cli_prompt
ish_sys_cli_alias vi vim
ish_sys_cli_alias v vim
ish_sys_cli_alias t "tmux attach"
ish_sys_cli_alias busybox "docker run -w /root -it busybox"
ish_sys_cli_alias alpine-dev "docker run -w /root -e 'LANG=en_US.UTF-8' -it alpine-dev sh"
ish_sys_cli_alias alpine "docker run -w /root -e 'LANG=en_US.UTF-8' -it alpine"
ish_sys_cli_alias centos "docker run -w /root -e 'LANG=en_US.UTF-8' -it centos"
[ -f ~/.bash_temp ] && source ~/.bash_temp; rm ~/.bash_temp &>/dev/null

3
etc/conf/header.conf Normal file
View File

@ -0,0 +1,3 @@
proxy_set_header X-HOST $scheme://$http_host/;
proxy_set_header X-Real-Port $remote_port;
proxy_set_header X-Real-IP $remote_addr;

19
etc/conf/location.conf Normal file
View File

@ -0,0 +1,19 @@
location / {
include header.conf;
if ($http_user_agent ~* "^Mozilla") {
return 302 https://$server_name/$request_uri;
}
proxy_pass http://contexts;
}
location /space/ {
include header.conf;
proxy_pass http://contexts;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
}
location /x/ {
include header.conf;
proxy_pass http://contexts_repos;
}

29
etc/conf/locations.conf Normal file
View File

@ -0,0 +1,29 @@
ssl_session_timeout 30m;
ssl_session_cache shared:SSL:1m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
client_max_body_size 100m;
client_body_timeout 300s;
client_body_in_file_only clean;
client_body_buffer_size 16K;
client_body_temp_path /tmp/nginx/client_body_temp;
location / {
include header.conf;
proxy_pass http://contexts;
}
location /space/ {
include header.conf;
proxy_pass http://contexts;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
}
location /x/ {
include header.conf;
proxy_pass http://contexts_repos;
}

50
etc/conf/nginx.conf Normal file
View File

@ -0,0 +1,50 @@
worker_processes 1;
events { worker_connections 1024; }
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
proxy_buffering off;
keepalive_timeout 1800;
log_format access '[$time_local] $remote_addr "$request" "$http_referer" "$http_user_agent" $server_name $status $body_bytes_sent';
access_log logs/access.log access;
upstream contexts_repos {
server 127.0.0.1:9030;
server 127.0.0.1:9020 backup;
}
upstream contexts {
server 127.0.0.1:9020;
}
server {
listen 80;
server_name shylinux.com;
include location.conf;
}
server {
listen 443 ssl;
server_name shylinux.com;
include locations.conf;
ssl_certificate_key 8293704_shylinux.com.key;
ssl_certificate 8293704_shylinux.com.pem;
}
server {
listen 80;
server_name contexts.com.cn;
include location.conf;
}
server {
listen 443 ssl;
server_name contexts.com.cn;
include locations.conf;
ssl_certificate_key 7424713_contexts.com.cn.key;
ssl_certificate 7424713_contexts.com.cn.pem;
}
}

8
etc/conf/rc_local.sh Normal file
View File

@ -0,0 +1,8 @@
contexts=${contexts:=/home/shy/contexts}
cd $contexts/usr/local/daemon/10000 && ./sbin/nginx -p $PWD
cd $contexts/usr/install/docker && dockerd --host unix://$PWD/docker.sock --pidfile $PWD/docker.pid --exec-root=$PWD/exec --data-root=$PWD/data --registry-mirror http://hub-mirror.c.163.com
su - shy -c "cd $contexts && ./bin/ice.bin forever start &"
su - shy -c "cd $contexts/usr/local/work/20220815-repos-server/ && ./bin/ice.bin forever start dev shy port 9030 nodename repos-server &"

5
etc/conf/vim_local.vim Normal file
View File

@ -0,0 +1,5 @@
inoremap jk <Esc>
cnoremap wa wa<CR>
set path=.,..,usr/,usr/volcanos/,usr/icebergs/,.ish/pluged/,~/.ish/pluged/,$GOROOT/src,/usr/include

View File

@ -1,2 +1,24 @@
~web.code.input
# wubi load file usr/wubi-dict/wubi86
# wubi load file usr/wubi-dict/person zone person
~web.code
webpack insert xterm
webpack insert xterm-addon-fit
webpack insert xterm-addon-web-links
webpack insert xterm/css/xterm.css
~aaa
role white void web.code.git.trend
role white void web.code.git.spide
~gdb
# config timer meta.enable true
event listen event serve.start cmd web.serve
event listen event serve.start cmd web.broad
event listen event dream.create cmd web.code.xterm
event listen event dream.create cmd web.code.tmux.session
~ssh
target web.code
source local.shy

View File

@ -1,5 +0,0 @@
# /etc/rc.local
# source /home/shy/2016-ContextOS/etc/local/2016.sh
[ -d /tmp/nginx ] || mkdir /tmp/nginx; cd /opt/daemon/10000 && ./sbin/nginx -p $PWD
cd /var/lib/maddy; /usr/local/bin/maddy run &> /var/lib/maddy/boot.log &

View File

@ -1,6 +0,0 @@
# /etc/rc.local
# source /home/shy/2022-ContextOS/etc/local/2022.sh
source /home/shy/2022-ContextOS/etc/local.sh
[ -d /tmp/nginx ] || mkdir /tmp/nginx; cd /opt/daemon/10000 && $PWD/sbin/nginx -p $PWD
# su - mysql -c 'cd /opt/daemon/10001/ && $PWD/bin/mysqld --basedir=./ --datadir=./data --plugin-dir=./lib/plugin --socket=mysqld.socket --log-error=mysqld.log --pid-file=mysqld.pid --port 10001 &'
su - mysql -c 'cd /opt/10001/ && $PWD/bin/mysqld --basedir=./ --datadir=./data --plugin-dir=./lib/plugin --socket=mysqld.socket --log-error=mysqld.log --pid-file=mysqld.pid --port 10001 &'

View File

@ -1,7 +0,0 @@
# /etc/rc.local
# source /home/shy/2023-ContextOS/etc/local/2023.sh
[ -d /tmp/nginx ] || mkdir /tmp/nginx; cd /opt/daemon/10000 && ./sbin/nginx -p $PWD
su - git -c 'GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini &'
su - mysql -c 'cd /opt/10001/ && ./bin/mysqld --basedir=./ --datadir=./data --plugin-dir=./lib/plugin --socket=mysqld.socket --log-error=mysqld.log --pid-file=mysqld.pid --port 10001 &'
# su - mysql -c 'cd /opt/daemon/10001/ && ./bin/mysqld --basedir=./ --datadir=./data --plugin-dir=./lib/plugin --socket=mysqld.socket --log-error=mysqld.log --pid-file=mysqld.pid --port 10001 &'

View File

@ -1,9 +0,0 @@
# /etc/rc.local
# source /root/2025-ContextOS/etc/local/2025.sh
for p in `ls /root/*/etc/local.sh`; do source $p; done
[ -d /tmp/nginx ] || mkdir /tmp/nginx; cd /opt/daemon/10000/ && $PWD/sbin/nginx -p $PWD &
su - git -c 'cd /opt/daemon/10010/ && GITEA_WORK_DIR=$PWD/var/lib/gitea/ $PWD/usr/local/bin/gitea web -c $PWD/etc/gitea/app.ini &'
su - mysql -c 'cd /opt/daemon/10001/ && $PWD/bin/mysqld --basedir=./ --datadir=./data --plugin-dir=./lib/plugin --socket=mysqld.socket --log-error=mysqld.log --pid-file=mysqld.pid --port 10001 &'
cd /opt/daemon/10002/ && $PWD/bin/dockerd --host unix://$PWD/docker.sock --pidfile $PWD/docker.pid --exec-root=$PWD/exec --data-root=$PWD/data --registry-mirror "https://ccr.ccs.tencentyun.com" --userland-proxy=false &
export DOCKER_HOST=unix://$PWD/docker.sock
# export DOCKER_HOST=unix:///opt/daemon/10002/docker.sock

View File

@ -1,15 +1,41 @@
#!/bin/sh
export ctx_shy=${ctx_shy:=https://shylinux.com}
if [ -f $PWD/.ish/plug.sh ]; then source $PWD/.ish/plug.sh; elif [ -f $HOME/.ish/plug.sh ]; then source $HOME/.ish/plug.sh; else
temp=$(mktemp); if curl -h &>/dev/null; then curl -o $temp -fsSL $ctx_shy; else wget -O $temp -q $ctx_shy; fi; source $temp intshell
fi; require conf.sh; require miss.sh; ish_sys_cli_prepare
export ctx_dev=${ctx_dev:="https://shylinux.com"}
temp=$(mktemp); if curl -h &>/dev/null; then curl -o $temp -fsSL $ctx_dev; else wget -O $temp -q $ctx_dev; fi; source $temp intshell
fi; require conf.sh; require miss.sh; ish_dev_git_prepare
ish_miss_prepare_compile
ish_miss_prepare_develop
ish_miss_prepare_project
ish_miss_prepare_contexts
ish_miss_prepare_resource
ish_miss_prepare_intshell
ish_miss_prepare_learning
ish_miss_prepare_volcanos
ish_miss_prepare_toolkits
ish_miss_prepare_icebergs
ish_miss_prepare release
ish_miss_prepare linux-story
ish_miss_prepare nginx-story
ish_miss_prepare golang-story
ish_miss_prepare redis-story
ish_miss_make; [ -z "$*" ] || ish_miss_serve "$@"
# ish_miss_prepare 20220202-family
# ish_miss_prepare 20220624-career
# ish_miss_prepare wubi-dict
# ish_miss_prepare word-dict
# ish_miss_prepare echarts
# ish_miss_prepare icons
ish_miss_prepare websocket
ish_miss_prepare go-qrcode
ish_miss_prepare go-git
_prepare_ttc() {
ish_sys_cli_prepare; ish_dev_tmux_prepare; ish_dev_git_prepare; ish_dev_vim_prepare # ish_dev_vim_plug_prepare
ish_sys_link_create ~/.bash_local.sh $PWD/etc/conf/bash_local.sh
ish_sys_link_create ~/.vim_local.vim $PWD/etc/conf/vim_local.vim
if tmux -V; then ish_miss_prepare_session miss miss; else ish_miss_serve_log; fi
}
ish_miss_make; if [ -n "$*" ]; then ish_miss_serve "$@"; else _prepare_ttc; fi

View File

@ -2,12 +2,17 @@ bin
usr/publish
usr/local/bin
usr/local/go/bin
usr/local/work/20220826-career/usr/publish
usr/local/work/20210308-sshd/usr/publish
usr/local/work/20221205-sshd/usr/publish
usr/install/bash-5.1/_install/bin
usr/install/tmux-3.2/_install/bin
usr/install/git-2.31.1/_install/bin
usr/install/git-2.31.1/_install/libexec/git-core
usr/install/vim-vim-12be734/_install/bin
usr/install/ctags-5.8/_install/bin
usr/install/gcc-4.8.4/_install/bin
usr/install/gdb-7.6.1/_install/bin
usr/install/qemu-3.1.0/_install/bin
usr/install/ffmpeg-4.2.1/_install/bin
usr/install/node-v16.15.1-darwin-x64/bin
usr/install/node-v16.15.1-linux-x64/bin
usr/install/jdk-18/bin

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2016;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2016;
}

View File

@ -1,10 +0,0 @@
server {
listen 443 ssl;
server_name 2016.shylinux.com;
include portal/2016/location.conf;
}
server {
listen 80;
server_name 2016.shylinux.com;
include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2016 {
server 127.0.0.1:9020;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2021;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2021;
}

View File

@ -1,10 +0,0 @@
server {
listen 443 ssl;
server_name 2021.shylinux.com;
include portal/2021/location.conf;
}
server {
listen 80;
server_name 2021.shylinux.com;
include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2021 {
server 127.0.0.1:9021;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2022-ContextOS;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2022-ContextOS;
}

View File

@ -1,10 +0,0 @@
server {
listen 443 ssl;
server_name 2022-ContextOS.shylinux.com;
include portal/2022-ContextOS/location.conf;
}
server {
listen 80;
server_name 2022-ContextOS.shylinux.com;
include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2022-ContextOS {
server 127.0.0.1:9022;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2022;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2022;
}

View File

@ -1,10 +0,0 @@
server {
listen 443 ssl;
server_name 2022.shylinux.com;
include portal/2022/location.conf;
}
server {
listen 80;
server_name 2022.shylinux.com;
include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2022 {
server 127.0.0.1:9022;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2023-ContextOS;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2023-ContextOS;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2023-ContextOS.shylinux.com;
include portal/2023-ContextOS/location.conf;
}
server {
listen 80;
server_name 2023-ContextOS.shylinux.com;
include location/tohttps.conf;
# include portal/2023-ContextOS/location.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2023-ContextOS {
server 127.0.0.1:9030;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2023;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2023;
}

View File

@ -1,10 +0,0 @@
server {
listen 443 ssl;
server_name 2023.shylinux.com;
include portal/2023/location.conf;
}
server {
listen 80;
server_name 2023.shylinux.com;
include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2023 {
server 127.0.0.1:9030;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2024-ContextOS;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2024-ContextOS;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2024-ContextOS.shylinux.com;
include portal/2024-ContextOS/location.conf;
}
server {
listen 80;
server_name 2024-ContextOS.shylinux.com;
include location/tohttps.conf;
# include portal/2024-ContextOS/location.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2024-ContextOS {
server 127.0.0.1:9040;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2024-guangdong;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2024-guangdong;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2024-guangdong.shylinux.com;
include portal/2024-guangdong/location.conf;
}
server {
listen 80;
server_name 2024-guangdong.shylinux.com;
include portal/2024-guangdong/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2024-guangdong {
server 127.0.0.1:9042;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2024-jingganjiaoyu;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2024-jingganjiaoyu;
}

View File

@ -1,10 +0,0 @@
server {
listen 443 ssl;
server_name 2024-jingganjiaoyu.shylinux.com;
include portal/2024-jingganjiaoyu/location.conf;
}
server {
listen 80;
server_name 2024-jingganjiaoyu.shylinux.com;
include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2024-jingganjiaoyu {
server jingganjiaoyu.com;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2024-laoshaojiaju;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2024-laoshaojiaju;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2024-laoshaojiaju.shylinux.com;
include portal/2024-laoshaojiaju/location.conf;
}
server {
listen 80;
server_name 2024-laoshaojiaju.shylinux.com;
include portal/2024-laoshaojiaju/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2024-laoshaojiaju {
server 127.0.0.1:9043;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2024-shandong;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2024-shandong;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2024-shandong.shylinux.com;
include portal/2024-shandong/location.conf;
}
server {
listen 80;
server_name 2024-shandong.shylinux.com;
include portal/2024-shandong/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2024-shandong {
server 127.0.0.1:9041;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2024-yunxuanlinghang;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2024-yunxuanlinghang;
}

View File

@ -1,10 +0,0 @@
server {
listen 443 ssl;
server_name 2024-yunxuanlinghang.shylinux.com;
include portal/2024-yunxuanlinghang/location.conf;
}
server {
listen 80;
server_name 2024-yunxuanlinghang.shylinux.com;
include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2024-yunxuanlinghang {
server yunxuanlinghang.com;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2024-zelinqiche;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2024-zelinqiche;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2024-zelinqiche.shylinux.com;
include portal/2024-zelinqiche/location.conf;
}
server {
listen 80;
server_name 2024-zelinqiche.shylinux.com;
include portal/2024-zelinqiche/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2024-zelinqiche {
server 127.0.0.1:9044;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2024;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2024;
}

View File

@ -1,10 +0,0 @@
server {
listen 443 ssl;
server_name 2024.shylinux.com;
include portal/2024/location.conf;
}
server {
listen 80;
server_name 2024.shylinux.com;
include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2024 {
server 127.0.0.1:9040;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-ContextOS;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-ContextOS;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-ContextOS.shylinux.com;
include portal/2025-ContextOS/location.conf;
}
server {
listen 80;
server_name 2025-ContextOS.shylinux.com;
include location/tohttps.conf;
# include portal/2025-ContextOS/location.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-ContextOS {
server 127.0.0.1:9050;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-bbs;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-bbs;
}

View File

@ -1,10 +0,0 @@
server {
listen 443 ssl;
server_name 2025-bbs.shylinux.com;
include portal/2025-bbs/location.conf;
}
server {
listen 80;
server_name 2025-bbs.shylinux.com;
include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-bbs {
server 127.0.0.1:9053;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-beijing-1;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-beijing-1;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-beijing-1.shylinux.com;
include portal/2025-beijing-1/location.conf;
}
server {
listen 80;
server_name 2025-beijing-1.shylinux.com;
include portal/2025-beijing-1/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-beijing-1 {
server 127.0.0.1:30006;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-beijing-2;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-beijing-2;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-beijing-2.shylinux.com;
include portal/2025-beijing-2/location.conf;
}
server {
listen 80;
server_name 2025-beijing-2.shylinux.com;
include portal/2025-beijing-2/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-beijing-2 {
server 127.0.0.1:30007;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-beijing-3;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-beijing-3;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-beijing-3.shylinux.com;
include portal/2025-beijing-3/location.conf;
}
server {
listen 80;
server_name 2025-beijing-3.shylinux.com;
include portal/2025-beijing-3/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-beijing-3 {
server 127.0.0.1:30008;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-cluster;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-cluster;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-cluster.shylinux.com;
include portal/2025-cluster/location.conf;
}
server {
listen 80;
server_name 2025-cluster.shylinux.com;
include portal/2025-cluster/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-cluster {
server 127.0.0.1:40000;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-dev;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-dev;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-dev.shylinux.com;
include portal/2025-dev/location.conf;
}
server {
listen 80;
server_name 2025-dev.shylinux.com;
include portal/2025-dev/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-dev {
server 127.0.0.1:9054;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-foundation;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-foundation;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-foundation.shylinux.com;
include portal/2025-foundation/location.conf;
}
server {
listen 80;
server_name 2025-foundation.shylinux.com;
include portal/2025-foundation/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-foundation {
server 127.0.0.1:9052;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-git;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-git;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-git.shylinux.com;
include portal/2025-git/location.conf;
}
server {
listen 80;
server_name 2025-git.shylinux.com;
include portal/2025-git/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-git {
server 127.0.0.1:9055;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-guangzhou-1;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-guangzhou-1;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-guangzhou-1.shylinux.com;
include portal/2025-guangzhou-1/location.conf;
}
server {
listen 80;
server_name 2025-guangzhou-1.shylinux.com;
include portal/2025-guangzhou-1/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-guangzhou-1 {
server 127.0.0.1:30000;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-guangzhou-2;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-guangzhou-2;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-guangzhou-2.shylinux.com;
include portal/2025-guangzhou-2/location.conf;
}
server {
listen 80;
server_name 2025-guangzhou-2.shylinux.com;
include portal/2025-guangzhou-2/location.conf;
# include location/tohttps.conf;
}

View File

@ -1,3 +0,0 @@
upstream 2025-guangzhou-2 {
server 127.0.0.1:30001;
}

View File

@ -1,9 +0,0 @@
location / {
include header/proxy.conf;
proxy_pass http://2025-guangzhou-3;
}
location /space/ {
include header/proxy.conf;
include header/websocket.conf;
proxy_pass http://2025-guangzhou-3;
}

View File

@ -1,11 +0,0 @@
server {
listen 443 ssl;
server_name 2025-guangzhou-3.shylinux.com;
include portal/2025-guangzhou-3/location.conf;
}
server {
listen 80;
server_name 2025-guangzhou-3.shylinux.com;
include portal/2025-guangzhou-3/location.conf;
# include location/tohttps.conf;
}

Some files were not shown because too many files have changed in this diff Show More