alroyso 1 year ago
commit
743f5ab3db
4 changed files with 57 additions and 0 deletions
  1. 5 0
      .env
  2. 0 0
      README.md
  3. 21 0
      docker-compose.yml
  4. 31 0
      nginx-ui/Dockerfile

+ 5 - 0
.env

@@ -0,0 +1,5 @@
+# All volumes driver
+VOLUMES_DRIVER=local
+
+# All Networks driver
+NETWORKS_DRIVER=bridge

+ 0 - 0
README.md


+ 21 - 0
docker-compose.yml

@@ -0,0 +1,21 @@
+### nginx-ui ##################################################
+    nginx-ui:
+      build:
+        context: ./nginx-ui
+      restart: always
+      environment:
+        - TZ=Asia/Shanghai
+      volumes:
+        - ./wwwroot:/var/www
+        - ./logs/nginx:/var/log/nginx
+        - ./nginx/nginx.conf:/etc/nginx/nginx.conf
+        - ./nginx/sites:/etc/nginx/sites-available
+        - ./nginx/stream:/etc/nginx/stream
+        - ./nginx/ssl:/etc/nginx/ssl
+        - ./nginx-ui/app.ini:/etc/nginx-ui/app.ini
+      ports:
+        - "88:9100"
+        - "${NGINX_HOST_HTTP_PORT}:80"
+        - "${NGINX_HOST_HTTPS_PORT}:443"
+      networks:
+        - ${NETWORKS_DRIVER}

+ 31 - 0
nginx-ui/Dockerfile

@@ -0,0 +1,31 @@
+FROM uozi/nginx-ui:latest
+
+# RUN echo "deb https://mirrors.163.com/debian/ bullseye main non-free contrib" > /etc/apt/sources.list \
+#     && echo "deb-src https://mirrors.163.com/debian/ bullseye main non-free contrib" >> /etc/apt/sources.list \
+#     && echo "deb https://mirrors.aliyun.com/debian-security/ bullseye-security main" >> /etc/apt/sources.list \
+#     && echo "deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main" >> /etc/apt/sources.list \
+#     && echo "deb https://mirrors.163.com/debian/ bullseye-updates main non-free contrib" >> /etc/apt/sources.list \
+#     && echo "deb-src https://mirrors.163.com/debian/ bullseye-updates main non-free contrib" >> /etc/apt/sources.list \
+#     && echo "deb https://mirrors.163.com/debian/ bullseye-backports main non-free contrib" >> /etc/apt/sources.list \
+#     && echo "deb-src https://mirrors.163.com/debian/ bullseye-backports main non-free contrib" >> /etc/apt/sources.list
+
+RUN apt update \
+    && apt upgrade -y \
+    && apt install -y zsh vim nano telnet coreutils lsof procps
+
+ARG NGINX_PHP_UPSTREAM_CONTAINER=php-fpm
+ARG NGINX_PHP_UPSTREAM_PORT=9000
+
+ARG NGINX_PHP74_UPSTREAM_CONTAINER=php-fpm74
+ARG NGINX_PHP56_UPSTREAM_CONTAINER=php-fpm56
+
+# # Set upstream conf and remove the default conf
+# RUN echo "upstream php-upstream { server ${NGINX_PHP_UPSTREAM_CONTAINER}:${NGINX_PHP_UPSTREAM_PORT}; }" > /etc/nginx/conf.d/upstream.conf \
+#     && echo "upstream php74-upstream { server ${NGINX_PHP74_UPSTREAM_CONTAINER}:${NGINX_PHP_UPSTREAM_PORT}; }" >> /etc/nginx/conf.d/upstream.conf \
+#     && echo "upstream php56-upstream { server ${NGINX_PHP56_UPSTREAM_CONTAINER}:${NGINX_PHP_UPSTREAM_PORT}; }" >> /etc/nginx/conf.d/upstream.conf \
+#     && rm /etc/nginx/conf.d/nginx-ui.conf
+
+RUN echo rm /etc/nginx/conf.d/nginx-ui.conf
+
+
+# EXPOSE 80 443 9100