secscan-authcheck icon indicating copy to clipboard operation
secscan-authcheck copied to clipboard

安装报错解决手册

Open BigYoungs opened this issue 3 years ago • 1 comments

记录了一下自己安装时遇到的报错,记录文档:https://bigyoung.cn/posts/250/

还是得有一定的docker技术和python flask技术,能够自己排查报错,才能顺利安装。

BigYoungs avatar Dec 30 '21 09:12 BigYoungs

DockerFile

FROM alpine:latest

MAINTAINER [email protected]

ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV mongo_database acc
ENV mongo_host 127.0.0.1
ENV mongo_port 27017
# ENV mongo_user user
# ENV mongo_password 123456
ENV redis_host 127.0.0.1
ENV redis_port 6379
ENV redis_db 0
# ENV redis_password 123456

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories

RUN apk update && apk upgrade && apk add gcc g++ linux-headers python3 python3-dev py3-pip uwsgi-python3

RUN ln -s /usr/bin/python3 /usr/bin/python

COPY . /opt/authcheck

WORKDIR /opt/authcheck

RUN python3 -m pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

EXPOSE 8888

ENTRYPOINT ["uwsgi", "--ini", "uwsgi.ini"]

requirements.txt

Flask
requests
Flask-Cors
mongoengine
APScheduler
uWSGI
redis
tzlocal

uwsgi.ini

[uwsgi]
http-socket = 0.0.0.0:8888
chdir = /opt/authcheck
plugin = python3
wsgi-file = wsgi.py
callable = app
processes = 4
enable-threads = true
master = true
logto2 = /var/log/authcheck.log
pidfile = /var/run/uwsgi.pid

kblockd avatar Oct 15 '22 14:10 kblockd