Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
chat-query
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
jaden
chat-query
Commits
4b14c71c
Commit
4b14c71c
authored
Jul 19, 2023
by
jaden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: docker compose
parent
2f9fabed
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
6 deletions
+42
-6
compose.yml
compose.yml
+37
-0
dockerfile
dockerfile
+5
-6
No files found.
compose.yml
0 → 100644
View file @
4b14c71c
version
:
'
3'
services
:
mysql
:
image
:
mysql:latest
ports
:
-
"
3306:3306"
environment
:
-
MYSQL_ROOT_PASSWORD=123789
-
MYSQL_DATABASE=chat_query
-
MYSQL_USER=xyy
-
MYSQL_PASSWORD=123789
volumes
:
-
./out:/var/lib/mysql
nest
:
image
:
jadenxiong/chat-query-backend:latest
environment
:
-
OPEN_AI_API_KEY=${OPEN_AI_API_KEY}
-
MODEL_NAME=gpt-3.5-turbo-16k-0613
-
BASE_URL=https://open-ai-xyy.deno.dev/v1
-
DB_HOST=mysql
-
DB_PORT=3306
ports
:
-
"
3001:3001"
depends_on
:
-
mysql
next
:
image
:
jadenxiong/chat-query:latest
environment
:
-
NEXT_PUBLIC_BACKEND_URL=http://nest:3001/
-
NEXT_PUBLIC_OPEN_AI_API_KEY=${OPEN_AI_API_KEY}
-
OPENAI_PROXY_URL=https://open-ai-xyy.deno.dev/
ports
:
-
"
3000:3000"
depends_on
:
-
nest
dockerfile
View file @
4b14c71c
...
...
@@ -5,7 +5,8 @@ FROM node:18
WORKDIR
/app
# 复制整个应用到容器中
COPY
./ /app
COPY
package*.json ./
COPY
pnpm-lock.yaml ./
# 安装依赖
RUN
npm i
-g
pnpm
...
...
@@ -20,11 +21,9 @@ ENV NEXT_PUBLIC_OPEN_AI_API_KEY $NEXT_PUBLIC_OPEN_AI_API_KEY
ARG
OPENAI_PROXY_URL
ENV
OPENAI_PROXY_URL $OPENAI_PROXY_URL
# 执行构建命令·
RUN
pnpm build
RUN
find /app
-mindepth
1
-maxdepth
1
!
-name
'.next'
-name
'.next'
!
-name
'node_modules'
-exec
rm
-rf
{}
+
COPY
package*.json ./
COPY
pnpm-lock.yaml ./
# 执行构建命令
COPY
.next ./.next
COPY
public ./public
# 暴露 3000 端口
EXPOSE
3000
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment