Skip to content

Commit

Permalink
use openresty instead of nginx
Browse files Browse the repository at this point in the history
Signed-off-by: Sahil Yeole <[email protected]>
  • Loading branch information
beelchester committed Jul 8, 2024
1 parent 13a9a36 commit 07cd053
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
RUN wget https://dl.google.com/go/go1.21.1.linux-amd64.tar.gz -O- | tar xz -C /usr/local
ENV PATH=$PATH:/usr/local/go/bin

# Install Nginx with echo module
RUN wget http://nginx.org/download/nginx-1.26.0.tar.gz && \
tar -xzvf nginx-1.26.0.tar.gz && \
git clone https://github.com/openresty/echo-nginx-module.git && \
cd nginx-1.26.0 && \
CFLAGS="-Wno-implicit-fallthrough" ./configure --prefix=/opt/nginx --add-module=../echo-nginx-module && \
make -j2 && \
make install
# Install Openresty
RUN apt-get update && \
apt-get -y install --no-install-recommends wget gnupg ca-certificates lsb-release && \
wget -O - https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/openresty-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openresty-archive-keyring.gpg] http://openresty.org/package/$(dpkg --print-architecture)/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/openresty.list && \
apt-get update && \
apt-get -y install --no-install-recommends openresty

# Nginx configurations
RUN mkdir -p /var/cache/nginx-cache \
Expand Down
2 changes: 1 addition & 1 deletion nginx/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ulimit -n 1000000
current_dir=$(pwd)

# Start nginx using the configuration file from the current directory
nginx -c "$current_dir/nginx/nginx.conf"
openresty -c "$current_dir/nginx/nginx.conf"

0 comments on commit 07cd053

Please sign in to comment.