Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	routes/overview.js
  • Loading branch information
qfdk committed Feb 29, 2024
2 parents 2871230 + eb3436a commit 144392f
Show file tree
Hide file tree
Showing 66 changed files with 793 additions and 40,534 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build_docker

on:
push:
branches: [master]
release:
types: [created] # 表示在创建新的 Release 时触发

jobs:
build_docker:
name: Build docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- run: |
echo "本次构建的版本为:${GITHUB_REF_NAME} (但是这个变量目前上下文中无法获取到)"
echo 本次构建的版本为:${{ github.ref_name }} ${{ secrets.DOCKERHUB_USERNAME }}
env
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
push: true
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/easydockerweb:${{ github.ref_name }}
${{ secrets.DOCKERHUB_USERNAME }}/easydockerweb:latest
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM node:9-alpine
ADD . /src

FROM node:lts-alpine
COPY . /src
RUN apk update && apk add bash && \
cd /src; yarn install && \
# Time zone option, if you live in China pleace set it to Asia/Shanghai
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime

EXPOSE 3000
CMD node /src/bin/www
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ docker run -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock easy-docker
- 系统状态查看
- 镜像获取
- 计划使用react重构 https://github.com/qfdk/EasyDockerWeb/tree/react
- 添加git actions

## Images
![login](./images/login.png)
Expand All @@ -77,11 +78,11 @@ docker run -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock easy-docker
## Sponsor
<a href="https://www.jetbrains.com/?from=EasyDockerWeb"><img src="images/jetbrains-variant-4.svg" alt="JetBrains" width="200"/></a>

## React.js web ui (beta)
## React.js web ui (removed)

```bash
cd web-ui
yarn install
yarn
yarn start
```
[http://localhost:4000](http://localhost:4000)
3 changes: 1 addition & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ app.all('*', (req, res, next) => {
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild');
res.header('Access-Control-Allow-Methods',
'PUT, POST, GET, DELETE, OPTIONS');
if (req.method == 'OPTIONS') {
if (req.method === 'OPTIONS') {
res.send(200); /* speedup options */
} else {
next();
Expand Down Expand Up @@ -74,7 +74,6 @@ app.use((err, req, res, next) => {
// set locals, only providing error in development
res.locals.message = err.message;
res.locals.error = req.app.get('env') === 'development' ? err : {};

// render the error page
res.status(err.status || 500);
res.render('error');
Expand Down
2 changes: 1 addition & 1 deletion middlewares/security.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ const checkUser = (req, res, next) => {
};

module.exports = {
checkUser,
checkUser
};
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
"start": "nodemon ./bin/www"
},
"dependencies": {
"babel-preset-react-app": "^9.1.1",
"body-parser": "~1.18.2",
"dockerode": "^2.5.4",
"ejs": "^2.5.7",
"body-parser": "1.20.1",
"dockerode": "^4.0.2",
"ejs": "3.1.7",
"express": "^4.16.4",
"express-session": "^1.17.1",
"express-status-monitor": "^1.2.8",
"serve-favicon": "^2.4.5",
"socket.io": "2.4.1"
},
"devDependencies": {
"nodemon": "^2.0.4"
"nodemon": "^3.0.3"
}
}
80 changes: 0 additions & 80 deletions public/js/addons/attach/attach.js

This file was deleted.

1 change: 0 additions & 1 deletion public/js/addons/attach/attach.js.map

This file was deleted.

53 changes: 0 additions & 53 deletions public/js/addons/fit/fit.js

This file was deleted.

1 change: 0 additions & 1 deletion public/js/addons/fit/fit.js.map

This file was deleted.

10 changes: 0 additions & 10 deletions public/js/addons/fullscreen/fullscreen.css

This file was deleted.

29 changes: 0 additions & 29 deletions public/js/addons/fullscreen/fullscreen.js

This file was deleted.

Loading

0 comments on commit 144392f

Please sign in to comment.