Skip to content

Add docker environments for dev - #13

Open
menbati wants to merge 5 commits into
michelbl:masterfrom
menbati:master
Open

Add docker environments for dev#13
menbati wants to merge 5 commits into
michelbl:masterfrom
menbati:master

Conversation

@menbati

@menbati menbati commented Mar 19, 2024

Copy link
Copy Markdown

Bonjour,
J'avais besoin de monter un environnement "simili-prod" afin de pouvoir faire une PR sur la partie web better-place pour ajouter des champs de recherche (à venir prochainement j'espère).
J'ai conscience que cette PR n'est probablement pas prod-ready, en particulier à cause de la config endpoint_url pour S3, mais si elle peut aider d'autres personnes à se monter un environnement local pour ce projet, ça pourra sauver quelques heures de mise en place peut être :)

Comment thread scraper_place/extraction.py Outdated
aws_secret_access_key=CONFIG_S3['aws_secret_access_key'],
region_name=CONFIG_S3['region_name'],
).resource('s3')
).resource('s3', endpoint_url=CONFIG_S3['endpoint_url'])

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
).resource('s3', endpoint_url=CONFIG_S3['endpoint_url'])
).resource('s3', endpoint_url=CONFIG_S3.get('endpoint_url'))

pour ne pas casser la prod ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

J'ai testé, en effet le .get() donne None en fallback par défaut ce qui est également la valeur par défaut de endpoint_url. Ca devrait donc bien se passer a priori...

Comment thread config.docker.ini Outdated
Comment thread config.docker.ini Outdated
aws_access_key_id=minio
aws_secret_access_key=minio123
endpoint_url=http://scraperplace-minio:9000
storage_class_deep_archive=STANDARD

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

idem (file_backups_storage_class)

@menbati menbati Mar 21, 2024

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

J'ai mis glacier_storage_classmais j'ai gardé la suggestion extract_backups_storage_class pour l'autre parametre

Comment thread .dockerignore Outdated
@michelbl

Copy link
Copy Markdown
Owner

Effectivement, l'ajout de l'endpoint pour s3 peut casser la prod il me semble, mais si j'ai tout compris ce n'est pas très compliqué de résoudre le problème.

Merci beaucoup pour cette contribution !

@menbati

menbati commented Mar 21, 2024

Copy link
Copy Markdown
Author

Je regarde tout ça dès que possible.
Merci pour le retour et grand merci pour le merge côté NodeJS. Je vais pouvoir faire pointer des pages de macellum.fr vers betterplace.info qui mérite très largement d'être connu.
Ca intéressera @manhack je l'espère

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