1 Star 1 Fork 21

Gabreil/Kiwi-TCMS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 2.03 KB
一键复制 编辑 原始数据 按行查看 历史
Mr. Senko 提交于 2020-05-25 16:45 . Install mariadb.rpm for /usr/bin/mysql
FROM centos:centos8
RUN dnf -y --setopt=tsflags=nodocs install python3 mariadb mariadb-connector-c postgresql \
httpd python3-mod_wsgi mod_ssl sscg && \
dnf clean all
# Apache configuration for non-root users
EXPOSE 8080
EXPOSE 8443
COPY ./httpd-foreground /httpd-foreground
CMD /httpd-foreground
RUN sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf && \
sed -i 's/Listen 443/Listen 8443/' /etc/httpd/conf.d/ssl.conf && \
sed -i 's!ErrorLog "logs/error_log"!ErrorLog "/dev/stderr"!' /etc/httpd/conf/httpd.conf && \
sed -i 's!CustomLog "logs/access_log"!CustomLog "/dev/stdout"!' /etc/httpd/conf/httpd.conf && \
sed -i 's!ErrorLog logs/ssl_error_log!ErrorLog "/dev/stderr"!' /etc/httpd/conf.d/ssl.conf && \
sed -i 's!TransferLog logs/ssl_access_log!TransferLog "/dev/stdout"!' /etc/httpd/conf.d/ssl.conf && \
sed -i 's!CustomLog logs/ssl_request_log!CustomLog "/dev/stdout"!' /etc/httpd/conf.d/ssl.conf && \
chmod -R a+rwx /run/httpd
COPY ./etc/kiwi-httpd.conf /etc/httpd/conf.d/
ENV PATH /venv/bin:${PATH} \
VIRTUAL_ENV /venv
# copy virtualenv dir which has been built inside the kiwitcms/buildroot container
# this helps keep -devel dependencies outside of this image
COPY ./dist/venv/ /venv
COPY ./manage.py /Kiwi/
# create directories so we can properly set ownership for them
RUN mkdir /Kiwi/ssl /Kiwi/static /Kiwi/uploads
# generate self-signed SSL certificate
RUN /usr/bin/sscg -v -f \
--country BG --locality Sofia \
--organization "Kiwi TCMS" \
--organizational-unit "Quality Engineering" \
--ca-file /Kiwi/static/ca.crt \
--cert-file /Kiwi/ssl/localhost.crt \
--cert-key-file /Kiwi/ssl/localhost.key
RUN sed -i "s/tcms.settings.devel/tcms.settings.product/" /Kiwi/manage.py && \
ln -s /Kiwi/ssl/localhost.crt /etc/pki/tls/certs/localhost.crt && \
ln -s /Kiwi/ssl/localhost.key /etc/pki/tls/private/localhost.key
# collect static files
RUN /Kiwi/manage.py collectstatic --noinput --link
# from now on execute as non-root
RUN chown -R 1001 /Kiwi/ /venv/
USER 1001
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Gabreil/Kiwi-TCMS.git
git@gitee.com:Gabreil/Kiwi-TCMS.git
Gabreil
Kiwi-TCMS
Kiwi-TCMS
master

搜索帮助