-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from qiangxuhui/main
add cr.loongnix.cn/labring/fastgpt:4.7
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# --------- downloader ----------- | ||
FROM cr.loongnix.cn/library/node:18.18 as downloader | ||
|
||
WORKDIR / | ||
|
||
RUN apt update && apt install wget -y | ||
|
||
RUN wget -q https://github.com/Loongson-Cloud-Community/FastGPT/releases/download/v4.7/app.tar.gz && tar xf app.tar.gz | ||
|
||
# --------- runner ----------- | ||
FROM cr.loongnix.cn/library/node:18.18 as runner | ||
|
||
WORKDIR /app | ||
|
||
# create user and use it | ||
RUN addgroup --system --gid 1001 nodejs | ||
RUN adduser --system --uid 1001 nextjs | ||
|
||
# copy running files | ||
COPY --from=downloader /app /app | ||
|
||
ENV NODE_ENV production | ||
ENV NEXT_TELEMETRY_DISABLED 1 | ||
ENV PORT=3000 | ||
|
||
EXPOSE 3000 | ||
|
||
USER nextjs | ||
|
||
ENV serverPath=./projects/app/server.js | ||
|
||
ENTRYPOINT ["sh","-c","node ${serverPath}"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This file is generated by the template. | ||
|
||
REGISTRY?=cr.loongnix.cn | ||
ORGANIZATION?=labring | ||
REPOSITORY?=fastgpt | ||
TAG?=4.7 | ||
LATEST?=true | ||
|
||
IMAGE=$(REGISTRY)/$(ORGANIZATION)/$(REPOSITORY):$(TAG) | ||
LATEST_IMAGE=$(REGISTRY)/$(ORGANIZATION)/$(REPOSITORY):latest | ||
|
||
default: image | ||
|
||
image: | ||
docker build \ | ||
--build-arg http_proxy=$(http_proxy) \ | ||
--build-arg https_proxy=$(https_proxy) \ | ||
-t $(IMAGE) \ | ||
. | ||
|
||
push: | ||
docker push $(IMAGE) | ||
#latest image | ||
@if [ $(LATEST) = "true" ]; \ | ||
then \ | ||
docker tag $(IMAGE) $(LATEST_IMAGE); \ | ||
docker push $(LATEST_IMAGE); \ | ||
fi |