From 40c8ca31b6d9e4335fe12981ba75217bcc888104 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Wed, 30 Jun 2021 23:32:48 +0800 Subject: [PATCH] update: more architecture support --- Dockerfile | 7 ++++--- backend/queryInfo.php | 2 +- conf/docker/nginx.conf | 13 +++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 conf/docker/nginx.conf diff --git a/Dockerfile b/Dockerfile index 21de7f7..96dd382 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,13 @@ FROM alpine -LABEL version="1.1" \ +LABEL version="1.2" \ maintainer="dnomd343" \ description="echo client IP details" COPY . /var/www/echoIP ADD ./conf/docker/init.sh / RUN apk --update add --no-cache nginx curl nodejs php7 php7-fpm php7-json php7-iconv php7-sqlite3 php7-openssl php7-mbstring && \ - mkdir /run/nginx && touch /run/nginx/nginx.pid && \ - cp /var/www/echoIP/conf/nginx/docker.conf /etc/nginx/conf.d && \ + mkdir -p /run/nginx && touch /run/nginx/nginx.pid && \ + cp /var/www/echoIP/conf/nginx/docker.conf /etc/nginx/echoip.conf && \ + cp -f /var/www/echoIP/conf/docker/nginx.conf /etc/nginx/nginx.conf && \ cp /var/www/echoIP/conf/docker/init.sh / && \ sed -i '$i\0\t0\t*\t*\t*\t/var/www/echoIP/backend/qqwryUpdate.sh' /var/spool/cron/crontabs/root EXPOSE 1601 diff --git a/backend/queryInfo.php b/backend/queryInfo.php index 4921daa..757e550 100644 --- a/backend/queryInfo.php +++ b/backend/queryInfo.php @@ -235,5 +235,5 @@ function main() { routeParam(); // 处理传入参数 } -$myVersion = 'v1.1'; +$myVersion = 'v1.2'; main(); diff --git a/conf/docker/nginx.conf b/conf/docker/nginx.conf new file mode 100644 index 0000000..fa68023 --- /dev/null +++ b/conf/docker/nginx.conf @@ -0,0 +1,13 @@ +user nginx; +worker_processes auto; +pcre_jit on; +include /etc/nginx/modules/*.conf; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + include /etc/nginx/echoip.conf; +} \ No newline at end of file