Docker Deploy
Init
base_path=/data
openresty_image=openresty/openresty:1.27.1.2-bookworm
mkdir -p $base_path/openresty/logs
mkdir -p $base_path/openresty/conf
mkdir -p $base_path/openresty/conf/conf.d
Pull Image
docker pull $openresty_image
nginx.conf
docker run --rm $openresty_image \
cat /usr/local/openresty/nginx/conf/nginx.conf \
> $base_path/openresty/conf/nginx.conf
default.conf
docker run --rm $openresty_image \
cat /etc/nginx/conf.d/default.conf \
> $base_path/openresty/conf/conf.d/default.conf
docker-run.sh
docker run -d \
--name openresty \
-p 80:80 \
-p 443:443 \
-v $base_path/openresty/conf/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf \
-v $base_path/openresty/conf/conf.d:/usr/local/openresty/etc/nginx/conf/conf.dd/ \
-v $base_path/openresty/logs:/usr/local/openresty/nginx/logs \
$openresty_image