upgrade build configration

This commit is contained in:
Beichi-CHs 2021-11-18 12:38:49 +08:00
parent d98b71f9e8
commit 3754fa2542
4 changed files with 36 additions and 29 deletions

2
.gitignore vendored
View File

@ -77,3 +77,5 @@ http_locations.conf
https_locations.conf https_locations.conf
venv/ venv/
#test docker-compose
docker-compose.yml

View File

@ -1,16 +1,20 @@
language: python language: python
python: python:
- "3.6" - "3.8"
services: services:
- docker - docker
- postgresql
install: install:
- pip install psycopg2
- pip install -r deploy/requirements.txt - pip install -r deploy/requirements.txt
- echo `cat /dev/urandom | head -1 | md5sum | head -c 32` > data/config/secret.key - echo `cat /dev/urandom | head -1 | md5sum | head -c 32` > data/config/secret.key
- ./init_db.sh - ./init_db.sh
script: script:
- docker ps -a - docker ps -a
- flake8 . - flake8 --config=./.flake8 .
- coverage run --include="$PWD/*" manage.py test - coverage run --include="$PWD/*" manage.py test
- coverage report - coverage report
notifications: notifications:
slack: onlinejudgeteam:BzBz8UFgmS5crpiblof17K2W email:
- beichi.dev@gmail.com
- 841734459@qq.com

View File

@ -1,11 +1,11 @@
FROM python:3.7-alpine3.9 FROM python:3.8-alpine3.14
ENV OJ_ENV production ENV OJ_ENV production
ADD . /app ADD . /app
WORKDIR /app WORKDIR /app
HEALTHCHECK --interval=5s --retries=3 CMD python2 /app/deploy/health_check.py HEALTHCHECK --interval=5s --retries=3 CMD python3 /app/deploy/health_check.py
RUN apk add --update --no-cache build-base nginx openssl curl unzip supervisor jpeg-dev zlib-dev postgresql-dev freetype-dev && \ RUN apk add --update --no-cache build-base nginx openssl curl unzip supervisor jpeg-dev zlib-dev postgresql-dev freetype-dev && \
pip install --no-cache-dir -r /app/deploy/requirements.txt && \ pip install --no-cache-dir -r /app/deploy/requirements.txt && \

View File

@ -1,32 +1,33 @@
certifi==2019.3.9 certifi==2019.3.9
chardet==3.0.4 chardet==3.0.4
coverage==4.5.3 coverage==6.1.2
Django==2.1.7 Django==3.2.9
django-redis==4.10.0 django-redis==5.0.0
djangorestframework==3.8.2 djangorestframework==3.12.4
entrypoints==0.3 entrypoints==0.3
Envelopes==0.4 Envelopes==0.4
flake8==3.7.7 flake8==4.0.1
flake8-coding==1.3.1 flake8-coding==1.3.2
flake8-quotes==1.0.0 flake8-quotes==3.3.1
gunicorn==19.9.0 gunicorn==20.1.0
idna==2.8 idna==3.3
jsonfield==2.0.2 jsonfield==3.1.0
mccabe==0.6.1 mccabe==0.6.1
otpauth==1.0.1 otpauth==1.0.1
Pillow==5.4.1 Pillow==8.4.0
psycopg2-binary==2.7.7 psycopg2-binary==2.9.2
pycodestyle==2.5.0 pycodestyle==2.8.0
pyflakes==2.1.1 pyflakes==2.4.0
python-dateutil==2.8.0 python-dateutil==2.8.2
pytz==2018.9 pytz==2021.3
qrcode==6.1 qrcode==7.3.1
raven==6.10.0 raven==6.10.0
redis==3.2.0 redis==3.5.3
requests==2.21.0 requests==2.26.0
six==1.12.0 six==1.16.0
urllib3==1.24.1 urllib3==1.26.7
XlsxWriter==1.1.5 XlsxWriter==3.0.2
django-dramatiq==0.5.0 django-dramatiq==0.10.0
dramatiq==1.3.0 dramatiq==1.12.0
django-dbconn-retry==0.1.5 django-dbconn-retry==0.1.5
django-cas-ng==4.2.1