Преглед на файлове

feat: 增加配置文件

haizemu преди 4 месеца
родител
ревизия
f318058811
променени са 2 файла, в които са добавени 24 реда и са изтрити 0 реда
  1. 11 0
      Dockerfile
  2. 13 0
      docker-app-compose.yml

+ 11 - 0
Dockerfile

@@ -0,0 +1,11 @@
+FROM    openresty/openresty
+
+COPY . /data/
+COPY ./nginx.conf /usr/local/openresty/nginx/conf/
+WORKDIR /data
+
+RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone 
+
+EXPOSE 3000
+
+#CMD ["/usr/local/openresty/nginx/sbin/nginx", "-c", "/usr/local/openresty/conf/nginx.conf"]

+ 13 - 0
docker-app-compose.yml

@@ -0,0 +1,13 @@
+version: '3'
+services:
+  loan-promote-h5-new:                      # 指定服务的名称
+    image: "loan-promote-h5-new:${h5_tag_name}"                         # 镜像名 .注意:${app_tag_name} 变量名不能带'-'符号,第一个'-'后会认为是默认值,而非变量名的一部分。
+    environment:                        # 环境变量
+      - VIRTUAL_HOST=loan-promote-h5-new.internal.jiebide.xin          # nginx-proxy 所用域名
+    networks:                           # 网络 (用于容器间通信)
+      - nginx-proxy
+
+networks:                               # 定义网络
+  nginx-proxy:
+    external:
+      name: nginx-proxy