网络模式

This commit is contained in:
sijinhui 2024-05-11 22:07:48 +08:00
parent 0914682095
commit 7324a0ba08
3 changed files with 12 additions and 10 deletions

View File

@ -1,9 +1,9 @@
name: PRO DEPLOY TO TY name: PRO DEPLOY TO TY
on: on:
workflow_dispatch: workflow_dispatch:
push: # push:
branches: # branches:
- main # - main
# paths: # paths:
# - 'app/**' # - 'app/**'
# - 'public/**' # - 'public/**'

View File

@ -65,9 +65,10 @@ COPY --from=builder /app/node_modules/sharp ./node_modules/sharp
RUN rm -f .env RUN rm -f .env
EXPOSE 3000 EXPOSE 23000
ENV KEEP_ALIVE_TIMEOUT=30 ENV KEEP_ALIVE_TIMEOUT=30
ENV HOSTNAME="" ENV HOSTNAME=127.0.0.1
ENV PORT=23000
CMD if [ -n "$PROXY_URL" ]; then \ CMD if [ -n "$PROXY_URL" ]; then \
export HOSTNAME="127.0.0.1"; \ export HOSTNAME="127.0.0.1"; \

View File

@ -12,8 +12,9 @@ services:
# depends_on: # depends_on:
# db: # db:
# condition: service_healthy # condition: service_healthy
ports: # ports:
- "127.0.0.1:23000:3000" # - "127.0.0.1:23000:23000"
network_mode: "host"
environment: environment:
- TZ=Asia/Shanghai - TZ=Asia/Shanghai
- OPENAI_API_KEY=$OPENAI_API_KEY - OPENAI_API_KEY=$OPENAI_API_KEY
@ -56,6 +57,6 @@ services:
max-size: "10m" max-size: "10m"
max-file: "1" max-file: "1"
networks: #networks:
chatgpt-ns: # chatgpt-ns:
external: true # external: true