feat: update docs
This commit is contained in:
parent
b96cdea2fc
commit
bc7c1ba1b0
2
.github/workflows/docker-hub.yml
vendored
2
.github/workflows/docker-hub.yml
vendored
@ -4,8 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
paths:
|
|
||||||
- 'packages/**'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push-docker:
|
push-docker:
|
||||||
|
@ -7,7 +7,7 @@ WORKDIR /tmp
|
|||||||
COPY . /tmp
|
COPY . /tmp
|
||||||
RUN npx npm-cli-adduser --username test --password test -e test@nocobase.com -r $VERDACCIO_URL
|
RUN npx npm-cli-adduser --username test --password test -e test@nocobase.com -r $VERDACCIO_URL
|
||||||
RUN cd /tmp && \
|
RUN cd /tmp && \
|
||||||
NEWVERSION="$(cat lerna.json | jq '.version' | tr -d '"').$(date +%s)" \
|
NEWVERSION="$(cat lerna.json | jq '.version' | tr -d '"').$(date +'+%Y%m%d%H%M%S')" \
|
||||||
&& tmp=$(mktemp) \
|
&& tmp=$(mktemp) \
|
||||||
&& jq ".version = \"${NEWVERSION}\"" lerna.json > "$tmp" && mv "$tmp" lerna.json
|
&& jq ".version = \"${NEWVERSION}\"" lerna.json > "$tmp" && mv "$tmp" lerna.json
|
||||||
RUN yarn install && yarn build
|
RUN yarn install && yarn build
|
||||||
|
@ -7,7 +7,7 @@ WORKDIR /tmp
|
|||||||
COPY . /tmp
|
COPY . /tmp
|
||||||
RUN npx npm-cli-adduser --username test --password test -e test@nocobase.com -r $VERDACCIO_URL
|
RUN npx npm-cli-adduser --username test --password test -e test@nocobase.com -r $VERDACCIO_URL
|
||||||
RUN cd /tmp && \
|
RUN cd /tmp && \
|
||||||
NEWVERSION="$(cat lerna.json | jq '.version' | tr -d '"').$(date +%s)" \
|
NEWVERSION="$(cat lerna.json | jq '.version' | tr -d '"').$(date +'+%Y%m%d%H%M%S')" \
|
||||||
&& tmp=$(mktemp) \
|
&& tmp=$(mktemp) \
|
||||||
&& jq ".version = \"${NEWVERSION}\"" lerna.json > "$tmp" && mv "$tmp" lerna.json
|
&& jq ".version = \"${NEWVERSION}\"" lerna.json > "$tmp" && mv "$tmp" lerna.json
|
||||||
RUN yarn install && yarn nocobase install && yarn pm add graph-collection-manager && yarn build
|
RUN yarn install && yarn nocobase install && yarn pm add graph-collection-manager && yarn build
|
||||||
|
@ -4,7 +4,7 @@ networks:
|
|||||||
driver: bridge
|
driver: bridge
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nocobase/nocobase:0.8.0-alpha.13
|
image: nocobase/nocobase:main
|
||||||
networks:
|
networks:
|
||||||
- nocobase
|
- nocobase
|
||||||
depends_on:
|
depends_on:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nocobase/nocobase:0.8.0-alpha.13
|
image: nocobase/nocobase:main
|
||||||
networks:
|
networks:
|
||||||
- nocobase
|
- nocobase
|
||||||
environment:
|
environment:
|
||||||
|
@ -4,7 +4,7 @@ networks:
|
|||||||
driver: bridge
|
driver: bridge
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nocobase/nocobase:0.8.0-alpha.13
|
image: nocobase/nocobase:main
|
||||||
networks:
|
networks:
|
||||||
- nocobase
|
- nocobase
|
||||||
environment:
|
environment:
|
||||||
|
@ -92,7 +92,7 @@ NocoBase version ([click here for the latest version](https://hub.docker.com/r/n
|
|||||||
```yml
|
```yml
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nocobase/nocobase:0.7.0-alpha.78
|
image: nocobase/nocobase:main
|
||||||
```
|
```
|
||||||
|
|
||||||
Environment variables
|
Environment variables
|
||||||
@ -100,14 +100,14 @@ Environment variables
|
|||||||
```yml
|
```yml
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nocobase/nocobase:0.7.0-alpha.78
|
image: nocobase/nocobase:main
|
||||||
environment:
|
environment:
|
||||||
- DB_DIALECT=postgres
|
- DB_DIALECT=postgres
|
||||||
- DB_HOST=postgres
|
- DB_HOST=postgres
|
||||||
- DB_DATABASE=nocobase
|
- DB_DATABASE=nocobase
|
||||||
- DB_USER=nocobase
|
- DB_USER=nocobase
|
||||||
- DB_PASSWORD=nocobase
|
- DB_PASSWORD=nocobase
|
||||||
- LOCAL_STORAGE_BASE_URL=http://localhost:13000/storage/uploads
|
- LOCAL_STORAGE_BASE_URL=/storage/uploads
|
||||||
```
|
```
|
||||||
|
|
||||||
- `DB_*` is the database related, if it is not the default database service of the example, please change it according to the actual situation.
|
- `DB_*` is the database related, if it is not the default database service of the example, please change it according to the actual situation.
|
||||||
@ -118,6 +118,8 @@ services:
|
|||||||
It may take a few minutes
|
It may take a few minutes
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# pull service images
|
||||||
|
$ docker-compose pull
|
||||||
# run in the background
|
# run in the background
|
||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
# view app logs
|
# view app logs
|
||||||
|
@ -26,35 +26,13 @@ cd nocobase/docker/app-postgres
|
|||||||
```yml
|
```yml
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nocobase/nocobase:0.8.0-alpha.1
|
image: nocobase/nocobase:main
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3. Delete old images (not required)
|
## 3. Restart the container
|
||||||
|
|
||||||
If you are using the latest image, you need to stop and delete the corresponding container first.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# find container ID
|
|
||||||
docker ps
|
|
||||||
# stop container
|
|
||||||
docker stop <YOUR_CONTAINER_ID>
|
|
||||||
# delete container
|
|
||||||
docker rm <YOUR_CONTAINER_ID>
|
|
||||||
```
|
|
||||||
|
|
||||||
Delete the old image
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# find image
|
|
||||||
docker images
|
|
||||||
# delete image
|
|
||||||
docker rmi <YOUR_CONTAINER_ID>
|
|
||||||
```
|
|
||||||
|
|
||||||
## 4. Restart the container
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
docker-compose pull
|
||||||
docker-compose up -d app
|
docker-compose up -d app
|
||||||
# 查看 app 进程的情况
|
|
||||||
docker-compose logs app
|
docker-compose logs app
|
||||||
```
|
```
|
||||||
|
@ -92,7 +92,7 @@ NocoBase 版本([点此查看最新版本](https://hub.docker.com/r/nocobase/n
|
|||||||
```yml
|
```yml
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nocobase/nocobase:0.7.0-alpha.78
|
image: nocobase/nocobase:main
|
||||||
```
|
```
|
||||||
|
|
||||||
环境变量
|
环境变量
|
||||||
@ -100,14 +100,14 @@ services:
|
|||||||
```yml
|
```yml
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nocobase/nocobase:0.7.0-alpha.78
|
image: nocobase/nocobase:main
|
||||||
environment:
|
environment:
|
||||||
- DB_DIALECT=postgres
|
- DB_DIALECT=postgres
|
||||||
- DB_HOST=postgres
|
- DB_HOST=postgres
|
||||||
- DB_DATABASE=nocobase
|
- DB_DATABASE=nocobase
|
||||||
- DB_USER=nocobase
|
- DB_USER=nocobase
|
||||||
- DB_PASSWORD=nocobase
|
- DB_PASSWORD=nocobase
|
||||||
- LOCAL_STORAGE_BASE_URL=http://localhost:13000/storage/uploads
|
- LOCAL_STORAGE_BASE_URL=/storage/uploads
|
||||||
```
|
```
|
||||||
|
|
||||||
- `DB_*` 为数据库相关,如果不是例子默认的数据库服务,请根据实际情况修改;
|
- `DB_*` 为数据库相关,如果不是例子默认的数据库服务,请根据实际情况修改;
|
||||||
@ -118,6 +118,8 @@ services:
|
|||||||
安装过程可能需要等待几分钟
|
安装过程可能需要等待几分钟
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# 拉取最新镜像
|
||||||
|
$ docker-compose pull
|
||||||
# 在后台运行
|
# 在后台运行
|
||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
# 查看 app 进程的情况
|
# 查看 app 进程的情况
|
||||||
|
@ -26,34 +26,15 @@ cd nocobase/docker/app-postgres
|
|||||||
```yml
|
```yml
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: nocobase/nocobase:0.8.0-alpha.1
|
image: nocobase/nocobase:main # main 分支
|
||||||
```
|
```
|
||||||
|
|
||||||
## 3. 删除旧镜像(非必须)
|
## 3. 重启容器
|
||||||
|
|
||||||
如果使用的是 latest 镜像,需要先停止并删除相对应容器
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# find container ID
|
|
||||||
docker ps
|
|
||||||
# stop container
|
|
||||||
docker stop <YOUR_CONTAINER_ID>
|
|
||||||
# delete container
|
|
||||||
docker rm <YOUR_CONTAINER_ID>
|
|
||||||
```
|
|
||||||
|
|
||||||
删除掉旧镜像
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# find image
|
|
||||||
docker images
|
|
||||||
# delete image
|
|
||||||
docker rmi <YOUR_CONTAINER_ID>
|
|
||||||
```
|
|
||||||
|
|
||||||
## 4. 重启容器
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# 拉取最新镜像
|
||||||
|
docker-compose pull
|
||||||
|
# 启动
|
||||||
docker-compose up -d app
|
docker-compose up -d app
|
||||||
# 查看 app 进程的情况
|
# 查看 app 进程的情况
|
||||||
docker-compose logs app
|
docker-compose logs app
|
||||||
|
Loading…
Reference in New Issue
Block a user