mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-22 10:56:39 +03:00
updated docker, dependencies
This commit is contained in:
parent
65a02bb660
commit
3090e33550
|
@ -2,9 +2,11 @@
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
USE_DOCKER=yes
|
USE_DOCKER=yes
|
||||||
IPYTHONDIR=/app/.ipython
|
IPYTHONDIR=/app/.ipython
|
||||||
|
DJANGO_READ_DOT_ENV_FILE=no
|
||||||
# Redis
|
# Redis
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
REDIS_URL=redis://redis:6379/0
|
REDIS_URL=redis://redis:6379/0
|
||||||
|
CELERY_BROKER_URL=redis://localhost:6379/0
|
||||||
|
|
||||||
# Celery
|
# Celery
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
|
@ -69,11 +69,7 @@ updates:
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
|
||||||
# Enable version updates for Python/Pip - Production
|
|
||||||
- package-ecosystem: "pip"
|
- package-ecosystem: "pip"
|
||||||
# Look for a `requirements.txt` in the `root` directory
|
|
||||||
# also 'setup.cfg', 'runtime.txt' and 'requirements/*.txt'
|
|
||||||
directory: "/"
|
directory: "/"
|
||||||
# Check for updates to GitHub Actions every weekday
|
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
|
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
|
@ -21,19 +21,16 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
linter:
|
linter:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
|
||||||
|
|
||||||
|
steps:
|
||||||
- name: Checkout Code Repository
|
- name: Checkout Code Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v3
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.11"
|
||||||
cache: pip
|
cache: poetry
|
||||||
cache-dependency-path: |
|
|
||||||
requirements/base.txt
|
|
||||||
requirements/local.txt
|
|
||||||
|
|
||||||
- name: Run pre-commit
|
- name: Run pre-commit
|
||||||
uses: pre-commit/action@v2.0.3
|
uses: pre-commit/action@v2.0.3
|
||||||
|
@ -43,7 +40,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout Code Repository
|
- name: Checkout Code Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
@ -58,3 +54,16 @@ jobs:
|
||||||
|
|
||||||
- name: Tear down the Stack
|
- name: Tear down the Stack
|
||||||
run: docker-compose -f local.yml down
|
run: docker-compose -f local.yml down
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build the Stack
|
||||||
|
run: docker-compose -f production.yml build
|
||||||
|
|
||||||
|
- name: Tear down the Stack
|
||||||
|
run: docker-compose -f production.yml down
|
||||||
|
|
|
@ -15,19 +15,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
# psycopg2 dependencies
|
# psycopg2 dependencies
|
||||||
libpq-dev
|
libpq-dev
|
||||||
|
|
||||||
RUN pip install poetry==1.2.2
|
|
||||||
|
|
||||||
# Configuring poetry
|
|
||||||
RUN poetry config virtualenvs.create false
|
|
||||||
COPY pyproject.toml poetry.lock /
|
|
||||||
|
|
||||||
# Installing requirements
|
|
||||||
RUN poetry install
|
|
||||||
# Removing gcc
|
|
||||||
RUN apt-get purge -y \
|
|
||||||
gcc \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
|
|
||||||
# Python 'run' stage
|
# Python 'run' stage
|
||||||
FROM python as python-run-stage
|
FROM python as python-run-stage
|
||||||
|
@ -51,6 +38,15 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN pip install poetry
|
||||||
|
|
||||||
|
# Configuring poetry
|
||||||
|
RUN poetry config virtualenvs.create false
|
||||||
|
COPY pyproject.toml poetry.lock /
|
||||||
|
|
||||||
|
# Installing requirements
|
||||||
|
RUN poetry install
|
||||||
|
|
||||||
|
|
||||||
COPY ./compose/production/django/entrypoint /entrypoint
|
COPY ./compose/production/django/entrypoint /entrypoint
|
||||||
RUN sed -i 's/\r$//g' /entrypoint
|
RUN sed -i 's/\r$//g' /entrypoint
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
|
python manage.py makemigrations
|
||||||
|
python manage.py migrate auth
|
||||||
|
python manage.py migrate
|
||||||
rm -f './celerybeat.pid'
|
rm -f './celerybeat.pid'
|
||||||
celery -A config.celery_app beat -l INFO
|
celery -A config.celery_app beat -l INFO
|
||||||
|
|
|
@ -19,20 +19,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
RUN pip install poetry==1.2.2
|
|
||||||
|
|
||||||
# Configuring poetry
|
|
||||||
RUN poetry config virtualenvs.create false
|
|
||||||
COPY pyproject.toml poetry.lock /
|
|
||||||
|
|
||||||
# Installing requirements
|
|
||||||
RUN poetry install
|
|
||||||
# Removing gcc
|
|
||||||
RUN apt-get purge -y \
|
|
||||||
gcc \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
|
|
||||||
# Python 'run' stage
|
# Python 'run' stage
|
||||||
FROM python as python-run-stage
|
FROM python as python-run-stage
|
||||||
|
|
||||||
|
@ -57,6 +43,16 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
|
RUN pip install poetry
|
||||||
|
|
||||||
|
# Configuring poetry
|
||||||
|
RUN poetry config virtualenvs.create false
|
||||||
|
COPY pyproject.toml poetry.lock /
|
||||||
|
|
||||||
|
# Installing requirements
|
||||||
|
RUN poetry install
|
||||||
|
|
||||||
|
|
||||||
COPY ./compose/local/docs/start /start-docs
|
COPY ./compose/local/docs/start /start-docs
|
||||||
RUN sed -i 's/\r$//g' /start-docs
|
RUN sed -i 's/\r$//g' /start-docs
|
||||||
RUN chmod +x /start-docs
|
RUN chmod +x /start-docs
|
||||||
|
|
4273
poetry.lock
generated
4273
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
|
@ -58,11 +58,11 @@ pytest-django = "^4.5.2"
|
||||||
gunicorn = "^20.1.0"
|
gunicorn = "^20.1.0"
|
||||||
sentry-sdk = "^1.12.0"
|
sentry-sdk = "^1.12.0"
|
||||||
django-anymail = {extras = ["mailgun"], version = "^8.6"}
|
django-anymail = {extras = ["mailgun"], version = "^8.6"}
|
||||||
psycopg2-binary = "^2.9.5"
|
|
||||||
django-polymorphic = "^3.1.0"
|
django-polymorphic = "^3.1.0"
|
||||||
django-jazzmin = "^2.6.0"
|
django-jazzmin = "^2.6.0"
|
||||||
django-cacheops = "^6.1"
|
django-cacheops = "^6.1"
|
||||||
django-extra-settings = "^0.7.0"
|
django-extra-settings = "^0.7.0"
|
||||||
|
psycopg2-binary = "^2.9.5"
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user