From ee30e840e3a2e2814cfc226db66c800ceb14bc41 Mon Sep 17 00:00:00 2001 From: Jacky Date: Sun, 5 May 2024 21:33:09 +0800 Subject: [PATCH] chore(demo): update dockerfile --- demo.Dockerfile | 18 ++++++++++++------ resources/demo/app.ini | 8 ++++---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/demo.Dockerfile b/demo.Dockerfile index d839a12e..176ded48 100644 --- a/demo.Dockerfile +++ b/demo.Dockerfile @@ -9,11 +9,17 @@ EXPOSE 80 COPY resources/demo/ojbk.me /etc/nginx/sites-available/ojbk.me COPY resources/demo/app.ini /etc/nginx-ui/app.ini COPY resources/demo/demo.db /etc/nginx-ui/database.db -COPY resources/docker/nginx.conf /etc/nginx/nginx.conf -COPY resources/docker/nginx-ui.conf /etc/nginx/conf.d/nginx-ui.conf -COPY resources/docker/start.sh /app/start.sh -COPY nginx-ui-$TARGETOS-$TARGETARCH$TARGETVARIANT/nginx-ui /app/nginx-ui -RUN cd /app && chmod a+x start.sh && rm -f /etc/nginx/conf.d/default.conf +# register nginx-ui service +COPY resources/docker/nginx-ui.run /etc/s6-overlay/s6-rc.d/nginx-ui/run +RUN echo 'longrun' > /etc/s6-overlay/s6-rc.d/nginx-ui/type && \ + touch /etc/s6-overlay/s6-rc.d/user/contents.d/nginx-ui -ENTRYPOINT ["./start.sh"] +# copy nginx config +COPY resources/docker/nginx.conf /usr/local/etc/nginx/nginx.conf +COPY resources/docker/nginx-ui.conf /usr/local/etc/nginx/conf.d/nginx-ui.conf + +# copy nginx-ui executable binary +COPY nginx-ui-$TARGETOS-$TARGETARCH$TARGETVARIANT/nginx-ui /usr/local/bin/nginx-ui + +RUN rm -f /etc/nginx/conf.d/default.conf diff --git a/resources/demo/app.ini b/resources/demo/app.ini index 3b5487b2..78d30fef 100644 --- a/resources/demo/app.ini +++ b/resources/demo/app.ini @@ -1,16 +1,16 @@ [server] HttpPort = 9000 RunMode = release -JwtSecret = 2E1CE615-BB15-44F5-B5BE-6B5DA3581D0F +JwtSecret = 6EEB622E-5C73-4082-AF76-7BAC337772F2 Email = test@jackyu.cn HTTPChallengePort = 9180 StartCmd = bash -NodeSecret = fdc7764f-92d2-454c-9640-6a09be121139 +NodeSecret = 57D079F2-CA8B-412A-B5C0-FDA291C13391 Demo = true [nginx] -AccessLogPath = /var/log/nginx/access.local.log -ErrorLogPath = /var/log/nginx/error.local.log +AccessLogPath = +ErrorLogPath = [openai] Model = gpt-3.5-turbo