Skip to content

Commit

Permalink
[migrate] use Mirror configuration of KaiYuanShe
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery committed Oct 5, 2023
1 parent 8fc5dd8 commit 1a2dcaa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ jobs:
remote: /tmp
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
privateKey: ${{ secrets.SSH_KEY }}
password: ${{ secrets.SSH_KEY }}

- name: Run Image
uses: garygrossgarten/github-action-ssh@release
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
privateKey: ${{ secrets.SSH_KEY }}
password: ${{ secrets.SSH_KEY }}
command: |
cd /tmp
mv docker-compose.yml .env start-docker.sh ~/
cd ~/
chmod +x ~/start-docker.sh
sudo ~/start-docker.sh ${{ env.ARTIFACT_PATH }}
echo ${{ secrets.SSH_KEY }} | sudo -S ~/start-docker.sh ${{ env.ARTIFACT_PATH }}
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ COPY package.json package-lock.json file-content-injector.js /home/node/app/
RUN npm i

COPY . /home/node/app
RUN npm run build

RUN npm prune --production || true \
npm cache clean -f
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ services:
networks:
- polyfiller
restart: always
command: caddy reverse-proxy --from polyfiller.app --to api-service:3000
command: caddy reverse-proxy --from polyfiller.kaiyuanshe.cn --to api-service:3000
4 changes: 2 additions & 2 deletions start-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
docker load < $1
docker image ls -a

docker compose down
docker compose up -d
docker-compose down --volumes
docker-compose up -d

docker image prune -a -f

0 comments on commit 1a2dcaa

Please sign in to comment.