Skip to content
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

TM-49 minio #406

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Open

TM-49 minio #406

wants to merge 12 commits into from

Conversation

ilin-art
Copy link
Collaborator

@ilin-art ilin-art commented Mar 5, 2024

No description provided.

@ilin-art ilin-art requested a review from Di0niz March 5, 2024 14:06
@ilin-art ilin-art self-assigned this Mar 5, 2024
Copy link

linear bot commented Mar 5, 2024

@Di0niz
Copy link
Collaborator

Di0niz commented Mar 11, 2024

S3 бакеты нужно исключить из проекта

@@ -68,6 +68,8 @@ jobs:
#----------------------------------------------
# run checks
#----------------------------------------------
- name: Set up environment variable for tests
run: echo "IS_GITHUB_ACTION=true" >> $GITHUB_ENV
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

добавь переменную окружения в Load cached venv

DJANGO_HOST = os.environ.get("DJANGO_HOST", "localhost")
MINIO_STORAGE_MEDIA_URL = f"http://{DJANGO_HOST}:9000/media/"

if os.environ.get("IS_GITHUB_ACTION") == "true":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давай переименуем на более осмысленное название и добавим флаг, который включает или выключает minio

@@ -14,4 +14,11 @@ server {
location /media/ {
alias /var/html/media/;
}
location /minio/ {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в сеттингах нужно указать новое значение для хранения media

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

предлагаю здесь использовать префикс s3 - так как на проде будет использоваться не minio как s3 хранилище

depends_on:
- backend

s3:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minio можно вынести из дефолтного пакета в отдельный, так как он нужен только для локального запуска у разработчика

Comment on lines 49 to 50
MINIO_ROOT_USER: ${MINIO_STORAGE_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${MINIO_STORAGE_SECRET_KEY}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для общего нейминга, нужно заменить на s3

Suggested change
MINIO_ROOT_USER: ${MINIO_STORAGE_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${MINIO_STORAGE_SECRET_KEY}
MINIO_ROOT_USER: ${S3_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY}

.env.sample Outdated
Comment on lines 18 to 19
MINIO_STORAGE_ACCESS_KEY=admin
MINIO_STORAGE_SECRET_KEY=password
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MINIO_STORAGE_ACCESS_KEY=admin
MINIO_STORAGE_SECRET_KEY=password
S3_ACCESS_KEY=admin
S3_SECRET_KEY=password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants