2
0

Dockerfile 820 B

12345678910111213141516171819202122232425262728293031323334
  1. FROM blackholll/loonflow-base:latest
  2. LABEL maintainer=blackholll@163.com
  3. RUN python3.10 -m venv /opt/venv/loonflow
  4. # 复制文件到镜像
  5. COPY . /opt/loonflow/
  6. WORKDIR /opt/loonflow/requirements
  7. RUN /opt/venv/loonflow/bin/pip install -r pro.txt
  8. WORKDIR /opt/loonflow/settings
  9. RUN cp pro.py.sample config.py
  10. RUN sed -i "/HOMEPATH = os.environ/c\ HOMEPATH = '/var/log/loonflow'" /opt/loonflow/settings/common.py
  11. ## 编译前端
  12. WORKDIR /opt/loonflow/frontend
  13. RUN npm install --unsafe-perm
  14. RUN npm run build
  15. # uwsgi配置文件
  16. ADD docker_compose_deploy/loonflow-web/uwsgi.ini /opt/loonflow/uwsgi.ini
  17. # nginx配置文件
  18. RUN mv /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.confbak
  19. ADD docker_compose_deploy/loonflow-web/nginx.conf /usr/local/nginx/conf/nginx.conf
  20. RUN mkdir /var/log/nginx