mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
Update requirements, fix build on M1 Mac
This commit is contained in:
@@ -17,7 +17,7 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile
|
||||
command: ["/bin/bash", "/code/compose-start.sh"]
|
||||
command: [ "/bin/bash", "/code/compose-start.sh" ]
|
||||
depends_on:
|
||||
- db
|
||||
env_file:
|
||||
@@ -30,6 +30,7 @@ services:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- .:/code
|
||||
stop_signal: SIGTERM
|
||||
|
||||
redis:
|
||||
image: "redis:alpine"
|
||||
@@ -42,7 +43,15 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile
|
||||
command: ["/venv/bin/celery", "-A", "config", "worker", "--concurrency=10", "--loglevel=debug"]
|
||||
command:
|
||||
[
|
||||
"/venv/bin/celery",
|
||||
"-A",
|
||||
"config",
|
||||
"worker",
|
||||
"--concurrency=10",
|
||||
"--loglevel=debug"
|
||||
]
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
@@ -53,12 +62,20 @@ services:
|
||||
- backend
|
||||
volumes:
|
||||
- .:/code
|
||||
stop_signal: SIGTERM
|
||||
|
||||
celery-beat:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile
|
||||
command: ["/venv/bin/celery", "-A", "config", "beat", "--loglevel=debug"]
|
||||
command:
|
||||
[
|
||||
"/venv/bin/celery",
|
||||
"-A",
|
||||
"config",
|
||||
"beat",
|
||||
"--loglevel=debug"
|
||||
]
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
@@ -69,7 +86,8 @@ services:
|
||||
- backend
|
||||
volumes:
|
||||
- .:/code
|
||||
|
||||
stop_signal: SIGTERM
|
||||
|
||||
flower:
|
||||
build: ./
|
||||
command: python -m flower -A tasks
|
||||
@@ -85,6 +103,7 @@ networks:
|
||||
backend:
|
||||
frontend:
|
||||
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# syntax = docker/dockerfile:experimental
|
||||
|
||||
# FROM revolutionsystems/python:3.8.3-wee-optimized-lto as builder-py
|
||||
FROM python:3.9-slim-buster AS builder-py
|
||||
|
||||
RUN apt-get update && apt-get install -y build-essential gcc python-dev postgresql-client && rm -rf /var/lib/apt/lists/*
|
||||
@@ -14,9 +13,8 @@ RUN python3 -m venv /venv
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
. /venv/bin/activate && \
|
||||
pip install -U pip && \
|
||||
pip install -r /code/requirements.txt
|
||||
pip install --no-compile -r /code/requirements.txt
|
||||
|
||||
# FROM revolutionsystems/python:3.8.3-wee-optimized-lto AS release
|
||||
FROM python:3.9-slim-buster AS release
|
||||
|
||||
ENV PATH /venv/bin:/bin:/usr/bin:/usr/local/bin
|
||||
@@ -37,5 +35,5 @@ CMD ["gunicorn", "-c", "/code/gunicorn.conf.py", "config.wsgi"]
|
||||
|
||||
ENV X_IMAGE_TAG v0.0.0
|
||||
|
||||
LABEL Description="Forum Image" Vendor="REVSYS"
|
||||
LABEL Description="Boost.org" Vendor="REVSYS"
|
||||
LABEL Version="${X_IMAGE_TAG}"
|
||||
|
||||
11
justfile
11
justfile
@@ -21,11 +21,18 @@ bootstrap: ## installs/updates all dependencies
|
||||
|
||||
# docker-compose --file $(COMPOSE_FILE) build --force-rm
|
||||
|
||||
rebuild:
|
||||
docker-compose rm -f celery || true
|
||||
docker-compose rm -f celery-beat || true
|
||||
docker-compose rm -f web
|
||||
docker-compose build --force-rm web
|
||||
|
||||
@cibuild: ## invoked by continuous integration servers to run tests
|
||||
python -m pytest
|
||||
python -m black --check .
|
||||
interrogate -c pyproject.toml .
|
||||
|
||||
alias shell := console
|
||||
@console: ## opens a console
|
||||
docker-compose run --rm web bash
|
||||
|
||||
@@ -37,15 +44,11 @@ bootstrap: ## installs/updates all dependencies
|
||||
docker-compose --file $(COMPOSE_FILE) build --force-rm
|
||||
docker-compose --file docker-compose.yml run --rm web python manage.py migrate --noinput
|
||||
|
||||
@test_interrogate:
|
||||
-docker-compose run --rm web interrogate -vv --fail-under 100 --whitelist-regex "test_.*" .
|
||||
|
||||
@test_pytest:
|
||||
-docker-compose run --rm web pytest -s
|
||||
|
||||
@test:
|
||||
just test_pytest
|
||||
just test_interrogate
|
||||
docker-compose down
|
||||
|
||||
@update: ## updates a project to run at its current version
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"message": "Not Found: /favicon.ico", "status_code": 404, "request": "<WSGIRequest: GET '/favicon.ico'>"}
|
||||
|
||||
@@ -25,7 +25,6 @@ redis
|
||||
black
|
||||
django-bakery
|
||||
django-test-plus
|
||||
interrogate
|
||||
pytest
|
||||
pytest-cov
|
||||
pytest-django
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# This file is autogenerated by pip-compile with python 3.9
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile --output-file=./requirements.txt ./requirements.in
|
||||
@@ -15,9 +15,7 @@ appdirs==1.4.4
|
||||
asgiref==3.3.4
|
||||
# via django
|
||||
attrs==21.1.0
|
||||
# via
|
||||
# interrogate
|
||||
# pytest
|
||||
# via pytest
|
||||
billiard==3.6.4.0
|
||||
# via celery
|
||||
black==21.5b0
|
||||
@@ -34,12 +32,6 @@ bumpversion==0.6.0
|
||||
# via -r ./requirements.in
|
||||
celery==5.0.5
|
||||
# via -r ./requirements.in
|
||||
click-didyoumean==0.0.3
|
||||
# via celery
|
||||
click-plugins==1.1.1
|
||||
# via celery
|
||||
click-repl==0.1.6
|
||||
# via celery
|
||||
click==7.1.2
|
||||
# via
|
||||
# black
|
||||
@@ -47,16 +39,30 @@ click==7.1.2
|
||||
# click-didyoumean
|
||||
# click-plugins
|
||||
# click-repl
|
||||
# interrogate
|
||||
# pip-tools
|
||||
colorama==0.4.4
|
||||
# via interrogate
|
||||
click-didyoumean==0.0.3
|
||||
# via celery
|
||||
click-plugins==1.1.1
|
||||
# via celery
|
||||
click-repl==0.1.6
|
||||
# via celery
|
||||
coverage==5.5
|
||||
# via pytest-cov
|
||||
dj-database-url==0.5.0
|
||||
# via environs
|
||||
dj-email-url==1.0.2
|
||||
# via environs
|
||||
django==3.2.2
|
||||
# via
|
||||
# -r ./requirements.in
|
||||
# django-db-geventpool
|
||||
# django-extensions
|
||||
# django-haystack
|
||||
# django-health-check
|
||||
# django-machina
|
||||
# django-redis
|
||||
# django-rest-auth
|
||||
# djangorestframework
|
||||
django-bakery==0.12.7
|
||||
# via -r ./requirements.in
|
||||
django-cache-url==3.2.3
|
||||
@@ -85,17 +91,6 @@ django-tracer==0.9.3
|
||||
# via -r ./requirements.in
|
||||
django-widget-tweaks==1.4.9
|
||||
# via django-machina
|
||||
django==3.2.2
|
||||
# via
|
||||
# -r ./requirements.in
|
||||
# django-db-geventpool
|
||||
# django-extensions
|
||||
# django-haystack
|
||||
# django-health-check
|
||||
# django-machina
|
||||
# django-redis
|
||||
# django-rest-auth
|
||||
# djangorestframework
|
||||
djangorestframework==3.12.4
|
||||
# via
|
||||
# -r ./requirements.in
|
||||
@@ -120,8 +115,6 @@ gunicorn==20.1.0
|
||||
# via -r ./requirements.in
|
||||
iniconfig==1.1.1
|
||||
# via pytest
|
||||
interrogate==1.3.2
|
||||
# via -r ./requirements.in
|
||||
jmespath==0.10.0
|
||||
# via
|
||||
# boto3
|
||||
@@ -150,15 +143,21 @@ prompt-toolkit==3.0.18
|
||||
# via click-repl
|
||||
psycogreen==1.0.2
|
||||
# via django-db-geventpool
|
||||
psycopg2-binary==2.8.6
|
||||
psycopg2-binary==2.9.3
|
||||
# via -r ./requirements.in
|
||||
py==1.10.0
|
||||
# via
|
||||
# interrogate
|
||||
# pytest
|
||||
# pytest-forked
|
||||
pyparsing==2.4.7
|
||||
# via packaging
|
||||
pytest==6.2.4
|
||||
# via
|
||||
# -r ./requirements.in
|
||||
# pytest-cov
|
||||
# pytest-django
|
||||
# pytest-forked
|
||||
# pytest-xdist
|
||||
pytest-cov==2.11.1
|
||||
# via -r ./requirements.in
|
||||
pytest-django==4.2.0
|
||||
@@ -167,13 +166,6 @@ pytest-forked==1.3.0
|
||||
# via pytest-xdist
|
||||
pytest-xdist==2.2.1
|
||||
# via -r ./requirements.in
|
||||
pytest==6.2.4
|
||||
# via
|
||||
# -r ./requirements.in
|
||||
# pytest-cov
|
||||
# pytest-django
|
||||
# pytest-forked
|
||||
# pytest-xdist
|
||||
python-dateutil==2.8.1
|
||||
# via
|
||||
# botocore
|
||||
@@ -206,14 +198,11 @@ sqlparse==0.4.1
|
||||
# via django
|
||||
structlog==21.1.0
|
||||
# via -r ./requirements.in
|
||||
tabulate==0.8.9
|
||||
# via interrogate
|
||||
text-unidecode==1.3
|
||||
# via faker
|
||||
toml==0.10.2
|
||||
# via
|
||||
# black
|
||||
# interrogate
|
||||
# pep517
|
||||
# pytest
|
||||
urllib3==1.26.4
|
||||
@@ -226,9 +215,9 @@ wcwidth==0.2.5
|
||||
# via prompt-toolkit
|
||||
whitenoise==5.2.0
|
||||
# via -r ./requirements.in
|
||||
zope.event==4.5.0
|
||||
zope-event==4.5.0
|
||||
# via gevent
|
||||
zope.interface==5.4.0
|
||||
zope-interface==5.4.0
|
||||
# via gevent
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
|
||||
Reference in New Issue
Block a user