Skip to content

Commit

Permalink
Merge pull request #264 from qiangxuhui/main
Browse files Browse the repository at this point in the history
add cr.loongnix.cn/labring/fastgpt:4.7
  • Loading branch information
qiangxuhui authored Oct 31, 2024
2 parents 2e4969e + 2a7ba82 commit 6b42140
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
32 changes: 32 additions & 0 deletions labring/fastgpt/4.7/Dockerfile
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}"]
28 changes: 28 additions & 0 deletions labring/fastgpt/4.7/Makefile
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

0 comments on commit 6b42140

Please sign in to comment.