Dockerfile 1.5 KB

12345678910111213141516171819202122232425262728293031323334
  1. FROM nginx
  2. MAINTAINER jeecgos@163.com
  3. VOLUME /tmp
  4. ENV LANG en_US.UTF-8
  5. RUN echo "server { \
  6. listen 80; \
  7. location ^~ /jeecg-boot { \
  8. proxy_pass http://jeecg-boot-system:8080/jeecg-boot/; \
  9. proxy_set_header Host jeecg-boot-system; \
  10. proxy_set_header X-Real-IP \$remote_addr; \
  11. proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \
  12. } \
  13. #解决Router(mode: 'history')模式下,刷新路由地址不能找到页面的问题 \
  14. location / { \
  15. root /var/www/html/; \
  16. index index.html index.htm; \
  17. if (!-e \$request_filename) { \
  18. rewrite ^(.*)\$ /index.html?s=\$1 last; \
  19. break; \
  20. } \
  21. } \
  22. location /fileDownload { \
  23. rewrite ^.+fileDownload/?(.*)$ /$1 break; \
  24. include uwsgi_params; \
  25. proxy_pass http://anzexian.oss-cn-shenzhen.aliyuncs.com/; #此处修改为自己的请求地址 \
  26. } \
  27. access_log /var/log/nginx/access.log ; \
  28. } " > /etc/nginx/conf.d/default.conf \
  29. && mkdir -p /var/www \
  30. && mkdir -p /var/www/html
  31. ADD dist/ /var/www/html/
  32. EXPOSE 80
  33. EXPOSE 443