Skip to content

Commit

Permalink
ci: change docker image name
Browse files Browse the repository at this point in the history
  • Loading branch information
zq-xu committed Sep 14, 2022
1 parent af74046 commit 6fbde1e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ImageTag ?=v0.9.6
SoybeanImg ?= soybean/soybean:$(ImageTag)
SoybeanAdminImg ?= soybeanjs/soybean-admin:$(ImageTag)

VERSION=$(shell git rev-parse --short HEAD)

soybean: soybean-build soybean-push
soybean-admin: soybean-admin-build soybean-admin-push

soybean-build:
docker build --build-arg version=$(VERSION) -t ${SoybeanImg} -f build/docker/Dockerfile .
soybean-admin-build:
docker build --build-arg version=$(VERSION) -t ${SoybeanAdminImg} -f docker/Dockerfile .

soybean-push:
docker push ${SoybeanImg}
soybean-admin-push:
docker push ${SoybeanAdminImg}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ pnpm build
- Docker 部署 Soybean

```bash
docker run --name soybean -p 80:80 -d soybean/soybean:v0.9.6
docker run --name soybean -p 80:80 -d soybeanjs/soybean-admin:v0.9.6
```

- 访问 Soybean
- 访问 SoybeanAdmin

打开本地浏览器访问`http://localhost`

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions build/docker/Dockerfile → docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:16.17.0 as builder

ENV WORKDIR=/soybean
ENV WORKDIR=/soybean-admin

WORKDIR $WORKDIR

Expand All @@ -18,7 +18,7 @@ FROM nginx:alpine as prod

RUN mkdir /soybean

COPY --from=builder /soybean/dist /soybean
COPY --from=builder /soybean/build/docker/nginx.conf /etc/nginx/nginx.conf
COPY --from=builder /soybean-admin/dist /soybean-admin
COPY --from=builder /soybean-admin/docker/nginx.conf /etc/nginx/nginx.conf

EXPOSE 80
2 changes: 1 addition & 1 deletion build/docker/nginx.conf → docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ http {
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
access_log on;
}
root /soybean/;
root /soybean-admin/;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
Expand Down

0 comments on commit 6fbde1e

Please sign in to comment.