Skip to content

Commit 055e022

Browse files
committed
feat(stacks): add nginx
1 parent 59ae445 commit 055e022

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

stacks/nginx/build.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Load stack utils
4+
. /usr/bin/stack-utils
5+
6+
# Implement build function
7+
function build() {
8+
cat << EOF > ${PROFILE_DIR}/${STACK_NAME}.sh
9+
export PATH="/opt/drycc/${STACK_NAME}/sbin:\$PATH"
10+
EOF
11+
./make.sh
12+
cp -rf /opt/drycc/nginx/* ${DATA_DIR}
13+
}
14+
15+
# call build stack
16+
build-stack "${1}"

stacks/nginx/make.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
curl -fsSL -o nginx.tar.gz http://nginx.org/download/nginx-${STACK_VERSION}.tar.gz
4+
tar -xvzf nginx.tar.gz
5+
cd nginx-${STACK_VERSION}
6+
./configure \
7+
--prefix=/opt/drycc/nginx \
8+
--with-threads \
9+
--with-file-aio \
10+
--with-http_ssl_module \
11+
--with-http_v2_module \
12+
--with-pcre-jit
13+
make
14+
make install
15+
rm -rf /workspace/nginx.tar.gz /workspace/nginx-${STACK_VERSION}

0 commit comments

Comments
 (0)