-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Создать CD и добавить Docker #3
Conversation
👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Крутой ПР! Интересные решения. Но вопросы еще будут)
@@ -0,0 +1,27 @@ | |||
FROM python:3.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Очень нравится этот Dockerfile, но все же нам нужно будет решить оставляем ли requrement . А еще вопрос почему не slim
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://hub.docker.com/_/python
В доке говорят, что лучше использовать дефолт, если нет ограничений по месту
У нас, вроде, пока про оптимизацию речь не идет :)
Можно отложить вопрос, думаю, до второго релиза
|
||
WORKDIR /app | ||
COPY ./poetry.lock ./pyproject.toml /app/ | ||
RUN poetry install $(test "$DJANGO_ENV" == production && echo "--only=main") --no-interaction --no-ansi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут у нас разделены среды и тут нужен ещё ключ --no-dev, чтобы не ставить ruff, pytest b pre-commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут согласен, пропустил данный ключ
Отличное замечание
@@ -0,0 +1,32 @@ | |||
version: '3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,32 @@ | |||
version: '3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тот же вопрос. Ну и healthcheck впишется. Да и для большей изоляции наверно стоит добавить networks ещё
@@ -0,0 +1,4 @@ | |||
[pytest] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вот с перемещение pyproject.toml там тоже остались настройки pytest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
о, это там хранится, не знал
можно тогда переписать пути в пайпроджект и удалить конфиг пайтеста
@@ -3,4 +3,4 @@ | |||
|
|||
@pytest.mark.django_db # TODO: тест для проверки пре коммита | удалить как будут тесты | |||
def test_testings(): | |||
assert 1 == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я не знаю как так получилось (⁄ ⁄•⁄ω⁄•⁄ ⁄)
docstring-code-format = true | ||
|
||
|
||
[tool.pytest.ini_options] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вот он не нужен, раз перемещен.
uses: actions/checkout@v3 | ||
- name: Set up Docker Buildbox | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А не рассматривал хранить сборки в GitHub Packages. Вариант интересный чтобы сборку было сразу видно в репозитории github`a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не сталкивался, но можно, вай нот
@@ -1,8 +1,81 @@ | |||
# name: Deployment | |||
name: Workflow For Build and Deploy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А не проверял его прямо на сервере?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Пока нет, на выходных собирался сделать
Всем привет!
Было сделано:
Чуток изменил CI файл, чтобы перестал отваливаться, и добавил настройки для pytest-django, иначе он не находил проект.