Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a77548b23 | ||
|
|
15ccade3d3 | ||
|
|
587fb6fb8a | ||
|
|
5bcb663ac8 | ||
|
|
cbd945536d | ||
|
|
081e9213c2 | ||
|
|
966fae2d4c | ||
|
|
dc4f9ea990 | ||
|
|
05b9c75714 | ||
|
|
4aeeea2325 | ||
|
|
72531cf6c2 | ||
|
|
9ad9be8c61 | ||
|
|
1aa15932a0 | ||
|
|
dbc6a4265a | ||
|
|
edea1f144a | ||
|
|
85c59c03cf | ||
|
|
a1f57bf1d1 | ||
|
|
e6f2c46c28 | ||
|
|
55c6c21aa3 | ||
|
|
40617185e9 | ||
|
|
c3dba45e17 | ||
|
|
83f58366a6 | ||
|
|
3fa09dad8e | ||
|
|
f0f0eb2ef0 | ||
|
|
436b87f8a8 | ||
|
|
f0888ef2ac | ||
|
|
03e23ec203 |
154
.github/workflows/casa.yml
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Build CasaOS
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ssh:
|
||||
description: 'SSH connection to Actions'
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
#on:
|
||||
# push:
|
||||
# branches:
|
||||
# - 'main'
|
||||
# tags:
|
||||
# - 'v*'
|
||||
env:
|
||||
REPO_URL: https://github.com/IceWhaleTech/CasaOS.git
|
||||
REPO_BRANCH: main
|
||||
PACK_SH_URL: https://raw.githubusercontent.com/jerrykuku/actions-casa/main/pack.sh
|
||||
PACK_SH: pack.sh
|
||||
TZ: Asia/Shanghai
|
||||
|
||||
jobs:
|
||||
xgo:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
go_version:
|
||||
- 1.17.1
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
# - name: Get release
|
||||
# id: get_release
|
||||
# uses: bruceadams/get-release@v1.2.3
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
# - name: Initialization environment
|
||||
# env:
|
||||
# DEBIAN_FRONTEND: noninteractive
|
||||
# run: |
|
||||
# sudo timedatectl set-timezone "$TZ"
|
||||
# sudo mkdir -p /workdir
|
||||
# sudo chown $USER:$GROUPS /workdir
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# - name: Clone source code
|
||||
# working-directory: /workdir
|
||||
# run: |
|
||||
# df -hT $PWD
|
||||
# git clone $REPO_URL -b $REPO_BRANCH --recursive casa
|
||||
# ln -sf /workdir/casa $GITHUB_WORKSPACE/casa
|
||||
# ls
|
||||
|
||||
|
||||
- name: Set enviroment for github-release
|
||||
run: |
|
||||
echo "VERSION=$(cat types/system.go | grep CURRENTVERSION | awk '$2 == "CURRENTVERSION"{print $4}' | sed 's/"//g')" >>$GITHUB_ENV
|
||||
echo "BODY=$(cat types/system.go | grep BODY | awk -F= '{print $2}' | sed 's/"//g')" >>$GITHUB_ENV
|
||||
|
||||
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14'
|
||||
|
||||
# - name: Build frontend with nodejs and yarn
|
||||
# run: |
|
||||
# cd casa/UI
|
||||
# ls
|
||||
# yarn install
|
||||
# yarn build
|
||||
|
||||
- name: list work
|
||||
run: pwd
|
||||
|
||||
# - name: Build with xgo
|
||||
# uses: crazy-max/ghaction-xgo@v1
|
||||
# with:
|
||||
# xgo_version: latest
|
||||
# go_version: ${{ matrix.go_version }}
|
||||
# dest: build
|
||||
# prefix: casa
|
||||
# targets: linux/amd64,linux/arm64
|
||||
# v: true
|
||||
# x: false
|
||||
# race: false
|
||||
# ldflags: -s -w
|
||||
# buildmode: default
|
||||
|
||||
- name: List Files
|
||||
run: |
|
||||
ls
|
||||
mkdir build
|
||||
cd build
|
||||
touch casa-linux-amd64
|
||||
touch casa-linux-arm64
|
||||
ls
|
||||
echo "::set-output name=status::success"
|
||||
|
||||
- name: Pack builds
|
||||
run: |
|
||||
wget $PACK_SH_URL
|
||||
chmod +x $PACK_SH
|
||||
./$PACK_SH
|
||||
echo "::set-output name=status::success"
|
||||
- name: list work
|
||||
run: ls
|
||||
|
||||
# - name: move
|
||||
# run: |
|
||||
# ls
|
||||
# mv /workdir/casa/upload/linux-amd64-casaos.tar.gz ./linux-amd64-casaos.tar.gz
|
||||
# mv /workdir/casa/upload/linux-arm64-casaos.tar.gz ./linux-arm64-casaos.tar.gz
|
||||
- name: Update release
|
||||
uses: meeDamian/github-release@2.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: >
|
||||
linux-amd64-casaos.tar.gz
|
||||
linux-arm64-casaos.tar.gz
|
||||
tag: v${{ env.VERSION }}
|
||||
body: >
|
||||
${{ env.BODY }}
|
||||
name: v${{ env.VERSION }}
|
||||
gzip: false
|
||||
allow_override: false
|
||||
prerelease: true
|
||||
# - name: Upload linux-amd64-casaos.tar.gz
|
||||
# id: upload_assets_amd64
|
||||
# uses: shogo82148/actions-upload-release-asset@v1
|
||||
# with:
|
||||
# upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
# asset_path: /workdir/casa/upload/linux-amd64-casaos.tar.gz
|
||||
#
|
||||
# - name: Upload linux-arm64-casaos.tar.gz
|
||||
# id: upload_assets_arm64
|
||||
# uses: shogo82148/actions-upload-release-asset@v1
|
||||
# with:
|
||||
# upload_url: ${{ steps.get_release.outputs.upload_url }}
|
||||
# asset_path: /workdir/casa/upload/linux-arm64-casaos.tar.gz
|
||||
1
.gitignore
vendored
@@ -28,3 +28,4 @@ gen
|
||||
/out/
|
||||
/db/
|
||||
/docs/
|
||||
/conf/
|
||||
|
||||
5
.gitmodules
vendored
@@ -1,3 +1,4 @@
|
||||
[submodule "CasaOS-UI"]
|
||||
path = CasaOS-UI
|
||||
[submodule "UI"]
|
||||
path = UI
|
||||
url = https://github.com/IceWhaleTech/CasaOS-UI.git
|
||||
branch = main
|
||||
@@ -13,18 +13,17 @@ CasaOS is an open-source home server system based on the Docker ecosystem and de
|
||||
IceWhale team believes that through community-driven collaborative innovation and open communication with global developers, we can reshape the digital home experience like never before.
|
||||
|
||||
|
||||
## Features
|
||||
## Key Features
|
||||
|
||||
- UI designed for home scenarios - simple, elegant, and easy-to-use
|
||||
- Quick Docker app installation with only three steps
|
||||
- Automatic Docker application management
|
||||
- Quick Docker app installation with only three steps, plus automatic management
|
||||
- App Store for private cloud 🚧
|
||||
- Home data/digital asset management 🚧
|
||||
- Smart home manager 🚧
|
||||
|
||||
🚧 is under development.
|
||||
|
||||
We are actively moving forward with development, and you are more than welcome to share any idea in the [Discord server](https://discord.gg/Gx4BCEtHjx)!
|
||||
We are actively moving forward with development, and you are more than welcome to share any idea with us!
|
||||
|
||||
|
||||
## Community
|
||||
@@ -84,4 +83,4 @@ curl -fsSL https://get.icewhale.io/casaos.sh | bash
|
||||
- Ober Zhang
|
||||
- Zyaire Ann
|
||||
- John Guan
|
||||
- More seats vacant for the right person
|
||||
- Right here, waiting for YOU!
|
||||
1
UI
Submodule
4
main.go
@@ -44,12 +44,12 @@ func main() {
|
||||
//model.Setup()
|
||||
//gredis.Setup()
|
||||
r := route.InitRouter(swagHandler)
|
||||
service.SyncTask(sqliteDB)
|
||||
//service.SyncTask(sqliteDB)
|
||||
cron2 := cron.New() //创建一个cron实例
|
||||
//执行定时任务(每5秒执行一次)
|
||||
err := cron2.AddFunc("0 0 0 1/1 * *", func() {
|
||||
//service.UpdataDDNSList(mysqldb)
|
||||
service.SyncTask(sqliteDB)
|
||||
//service.SyncTask(sqliteDB)
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
oasis_err2 "github.com/IceWhaleTech/CasaOS/pkg/utils/oasis_err"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
func JWT(swagHandler gin.HandlerFunc) gin.HandlerFunc {
|
||||
@@ -22,13 +21,15 @@ func JWT(swagHandler gin.HandlerFunc) gin.HandlerFunc {
|
||||
code = oasis_err2.INVALID_PARAMS
|
||||
}
|
||||
if swagHandler == nil {
|
||||
claims, err := ParseToken(token)
|
||||
//claims, err := ParseToken(token)
|
||||
_, err := ParseToken(token)
|
||||
if err != nil {
|
||||
code = oasis_err2.ERROR_AUTH_TOKEN
|
||||
|
||||
} else if time.Now().Unix() > claims.ExpiresAt {
|
||||
code = oasis_err2.ERROR_AUTH_TOKEN
|
||||
}
|
||||
//else if time.Now().Unix() > claims.ExpiresAt {
|
||||
// code = oasis_err2.ERROR_AUTH_TOKEN
|
||||
//}
|
||||
}
|
||||
|
||||
if code != oasis_err2.SUCCESS {
|
||||
|
||||
@@ -80,12 +80,12 @@ func (s *taskService) GetServerTasks() []model.TaskDBModel {
|
||||
list := []model.TaskDBModel{}
|
||||
json2.Unmarshal([]byte(gjson.Get(listS, "data").String()), &list)
|
||||
|
||||
go func(list []model.TaskDBModel) {
|
||||
for _, dbModel := range list {
|
||||
dbModel.Id = 0
|
||||
s.db.Create(&dbModel)
|
||||
}
|
||||
}(list)
|
||||
//go func(list []model.TaskDBModel) {
|
||||
// for _, dbModel := range list {
|
||||
// dbModel.Id = 0
|
||||
// s.db.Create(&dbModel)
|
||||
// }
|
||||
//}(list)
|
||||
return list
|
||||
}
|
||||
func (s *taskService) SyncTaskService() {
|
||||
@@ -133,12 +133,12 @@ func SyncTask(db *gorm.DB) {
|
||||
list := []model.TaskDBModel{}
|
||||
json2.Unmarshal([]byte(gjson.Get(listS, "data").String()), &list)
|
||||
|
||||
//go func(list []model.TaskDBModel) {
|
||||
// for _, dbModel := range list {
|
||||
// dbModel.Id = 0
|
||||
// db.Create(&dbModel)
|
||||
// }
|
||||
//}(list)
|
||||
go func(list []model.TaskDBModel) {
|
||||
for _, dbModel := range list {
|
||||
dbModel.Id = 0
|
||||
db.Create(&dbModel)
|
||||
}
|
||||
}(list)
|
||||
}
|
||||
func NewTaskService(db *gorm.DB, log loger2.OLog) TaskService {
|
||||
return &taskService{db: db, log: log}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
package types
|
||||
|
||||
const CURRENTVERSION = "0.1.2"
|
||||
const CURRENTVERSION = "0.1.4"
|
||||
const BODY = "<li> Modify the publishing process</li> <li>Optimized app parameter display</li>"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/ui/img/icon/mstile-150x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
BIN
web/favicon.ico
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 693 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="200.000000pt" height="200.000000pt" viewBox="0 0 200.000000 200.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,200.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M875 1894 c-11 -2 -51 -11 -88 -20 -341 -78 -610 -364 -673 -714 -82
|
||||
-459 197 -902 647 -1030 94 -27 277 -37 378 -21 303 47 575 261 690 540 55
|
||||
133 66 192 65 361 -1 136 -4 165 -27 235 -36 116 -62 170 -123 261 -123 186
|
||||
-347 336 -566 379 -42 8 -276 15 -303 9z m250 -168 c11 -2 42 -9 70 -16 131
|
||||
-30 288 -135 387 -260 160 -201 198 -506 93 -745 l-22 -50 2 80 c3 180 -64
|
||||
351 -184 476 -209 216 -544 260 -807 105 -201 -117 -326 -347 -319 -587 l2
|
||||
-74 -19 44 c-63 140 -80 332 -44 476 24 94 87 219 147 292 109 133 290 238
|
||||
448 259 25 3 47 7 49 9 5 4 173 -3 197 -9z m8 -501 c33 -8 85 -31 116 -50 227
|
||||
-137 305 -418 183 -651 l-21 -39 -1 35 c-9 251 -245 439 -490 389 -186 -38
|
||||
-323 -200 -330 -389 l-1 -35 -23 45 c-101 194 -61 429 99 578 130 122 292 162
|
||||
468 117z m-27 -499 c182 -85 183 -345 1 -438 -53 -27 -161 -26 -215 1 -146 75
|
||||
-180 267 -69 390 63 69 190 90 283 47z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;stroke:#FFFFFF;stroke-width:2;stroke-linejoin:round;stroke-miterlimit:2;}
|
||||
</style>
|
||||
<path class="st0" d="M12,22c5.5,0,10-4.5,10-10S17.5,2,12,2S2,6.5,2,12S6.5,22,12,22z"/>
|
||||
<path class="st0" d="M12,22c3.9,0,7-3.1,7-7s-3.1-7-7-7s-7,3.1-7,7S8.1,22,12,22z"/>
|
||||
<path class="st0" d="M12,22c2.2,0,4-1.8,4-4s-1.8-4-4-4s-4,1.8-4,4S9.8,22,12,22z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 729 B |
|
Before Width: | Height: | Size: 26 KiB |
@@ -1,34 +0,0 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/ui/img/icon/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/ui/img/icon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/ui/img/icon/favicon-16x16.png">
|
||||
<link rel="manifest" href="/ui/site.webmanifest">
|
||||
<link rel="mask-icon" href="/ui/img/icon/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<link rel="icon" href="/ui/favicon.ico">
|
||||
<link rel="stylesheet" href="//cdn.materialdesignicons.com/2.0.46/css/materialdesignicons.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/js/all.js"
|
||||
integrity="sha256-GaerX2a/DuOnPrxn/4vH13dobiFUe/27LO6gCZDNauA=" crossorigin="anonymous"></script>
|
||||
<title>
|
||||
CasaOS
|
||||
</title>
|
||||
<link href="/ui/js/app.js" rel="preload" as="script"><link href="/ui/js/chunk-vendors.js" rel="preload" as="script"></head>
|
||||
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but CasaOS doesn't work properly without JavaScript enabled.
|
||||
Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
<script type="text/javascript" src="/ui/js/chunk-vendors.js"></script><script type="text/javascript" src="/ui/js/app.js"></script></body>
|
||||
|
||||
</html>
|
||||
1297
web/js/app.js
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "",
|
||||
"short_name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/ui/img/icon/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||