-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: dev
Are you sure you want to change the base?
TM-49 minio #406
Conversation
S3 бакеты нужно исключить из проекта |
.github/workflows/workflow.yml
Outdated
@@ -68,6 +68,8 @@ jobs: | |||
#---------------------------------------------- | |||
# run checks | |||
#---------------------------------------------- | |||
- name: Set up environment variable for tests | |||
run: echo "IS_GITHUB_ACTION=true" >> $GITHUB_ENV |
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.
добавь переменную окружения в Load cached venv
src/lizaalert/settings/base.py
Outdated
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": |
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.
давай переименуем на более осмысленное название и добавим флаг, который включает или выключает minio
services/nginx/site.conf
Outdated
@@ -14,4 +14,11 @@ server { | |||
location /media/ { | |||
alias /var/html/media/; | |||
} | |||
location /minio/ { |
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.
в сеттингах нужно указать новое значение для хранения media
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.
предлагаю здесь использовать префикс s3 - так как на проде будет использоваться не minio как s3 хранилище
docker-compose.yml
Outdated
depends_on: | ||
- backend | ||
|
||
s3: |
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.
minio можно вынести из дефолтного пакета в отдельный, так как он нужен только для локального запуска у разработчика
docker-compose.yml
Outdated
MINIO_ROOT_USER: ${MINIO_STORAGE_ACCESS_KEY} | ||
MINIO_ROOT_PASSWORD: ${MINIO_STORAGE_SECRET_KEY} |
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.
для общего нейминга, нужно заменить на s3
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
MINIO_STORAGE_ACCESS_KEY=admin | ||
MINIO_STORAGE_SECRET_KEY=password |
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.
MINIO_STORAGE_ACCESS_KEY=admin | |
MINIO_STORAGE_SECRET_KEY=password | |
S3_ACCESS_KEY=admin | |
S3_SECRET_KEY=password |
No description provided.