Skip to content

Commit

Permalink
update openresty (#12)
Browse files Browse the repository at this point in the history
* update openresty folders
* debug openresty
  • Loading branch information
haobibo authored Jun 17, 2024
1 parent 8d96e12 commit 138813b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docker_casdoor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ ARG BASE_IMG="node"

FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG_BUILD} as builder
COPY work /opt/utils/
RUN set -ex \
RUN set -eux \
&& source /opt/utils/script-setup-casdoor.sh \
&& setup_casdoor


FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG}
COPY --from=builder /opt/casdoor /opt/casdoor
COPY work/app.conf /opt/casdoor/conf/app.conf
RUN set -ex \
RUN set -eux \
&& mkdir -pv /root/web && ln -sf /opt/casdoor/web/build /root/web/

LABEL maintainer="[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion docker_dev_box/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ARG ARG_KEEP_NODEJS=true

COPY work /opt/utils/

RUN set -ex && source /opt/utils/script-utils.sh \
RUN set -eux && source /opt/utils/script-utils.sh \
# Setup Jupyter: Basic Configurations and Extensions
&& mkdir -pv /opt/conda/etc/jupyter/ \
&& mv /opt/utils/etc_jupyter/* /opt/conda/etc/jupyter/ && rm -rf /opt/utils/etc_jupyter \
Expand Down
2 changes: 1 addition & 1 deletion docker_dev_box/hub.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ARG ARG_KEEP_NODEJS=true

COPY work /opt/utils/

RUN set -ex \
RUN set -eux \
# Setup JupyterHub
&& source /opt/utils/script-devbox-jupyter.sh \
&& mv /opt/utils/start-*.sh /usr/local/bin/ && chmod +x /usr/local/bin/start-*.sh \
Expand Down
4 changes: 2 additions & 2 deletions docker_keycloak/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Distributed under the terms of the Modified BSD License.

ARG BASE_NAMESPACE
ARG BASE_IMG="jdk17"
ARG BASE_IMG="jdk-17"
FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG}

LABEL maintainer="[email protected]"

COPY work /opt/utils/

RUN set -ex \
RUN set -eux \
&& source /opt/utils/script-setup-keycloak.sh && setup_keycloak \
&& echo "keycloak:x:0:root" >> /etc/group \
&& echo "keycloak:x:1000:0:keycloak user:/opt/keycloak:/sbin/nologin" >> /etc/passwd \
Expand Down
9 changes: 6 additions & 3 deletions docker_openresty/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ LABEL maintainer="[email protected]"

COPY work /opt/utils/

RUN set -ex \
RUN set -eux \
&& useradd nginx -G www-data \
&& mkdir -pv /var/cache/nginx /var/log/nginx \
&& chown -R nginx:www-data /var/cache/nginx /var/log/nginx \
&& source /opt/utils/script-utils.sh && install_apt /opt/utils/install_list_openresty.apt \
&& source /opt/utils/script-setup.sh && setup_lua_base && setup_lua_rocks \
&& source /opt/utils/script-setup-openresty.sh && setup_openresty \
&& source /opt/utils/script-setup-acme.sh && setup_acme \
&& pip install certbot \
&& useradd nginx -G www-data \
&& mkdir -pv /var/cache/nginx /var/log/nginx \
&& install__clean

VOLUME [ "/var/log/nginx", "/var/cache/nginx" ]

CMD ["/opt/nginx/bin/nginx", "-g", "daemon off;"]

# Use SIGQUIT instead of default SIGTERM to cleanly drain requests
Expand Down
4 changes: 4 additions & 0 deletions docker_openresty/work/script-setup-openresty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ setup_openresty() {
--with-pcre \
--with-pcre-jit \
&& make -j8 && make install \
&& mkdir -pv /usr/local/openresty/ /var/log/nginx /var/cache/nginx /tmp/nginx \
&& ln -sf ${NGINX_HOME}/bin/nginx /usr/bin/ \
&& ln -sf /opt/nginx /usr/local/openresty/ \
&& ln -sf /opt/nginx /etc/ \
&& nginx -t \
&& echo "@ Version info of Nginx: $(nginx -version)"
}

0 comments on commit 138813b

Please sign in to comment.