Skip to content

Commit

Permalink
chore: update deployment scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
msyfls123 committed Feb 21, 2024
1 parent f8dbd0b commit bf3fe91
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: push

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out Git repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -42,7 +42,9 @@ jobs:
args: --bin server --release

- name: Run
run: ./script/run_on_ci.sh
run:
chmod +x ./target/release/server
./script/run_on_ci.sh

- name: Archive debug artifacts
uses: actions/upload-artifact@v2
Expand All @@ -53,4 +55,7 @@ jobs:
server/templates
static/
Rocket.toml
DEPLOY.md
Dockerfile
docker-compose.yml
!static/.gitignore
20 changes: 20 additions & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Setup
```shell
unzip build.zip -d ./bard
mkdir store
cd bard
```

# Build
docker build -t bard:1 .

# Run
docker-compose up -d

# Debug
https://www.runoob.com/docker/docker-mirror-acceleration.html

Ubuntu14.04、Debian7Wheezy
对于使用 upstart 的系统而言,编辑 /etc/default/docker 文件,在其中的 DOCKER_OPTS 中配置加速器地址:

DOCKER_OPTS="--registry-mirror=https://registry.docker-cn.com"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y libsqlite3-dev
WORKDIR /opt/app
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ bard:
image: bard:1
volumes:
- .:/opt/app
- ./store:/opt/app/store
- ../store:/opt/app/store
ports:
- "8001:8000"

0 comments on commit bf3fe91

Please sign in to comment.