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

Simplify setting up dev environment #993

Merged
merged 11 commits into from
Mar 4, 2022
Merged

Simplify setting up dev environment #993

merged 11 commits into from
Mar 4, 2022

Conversation

talavis
Copy link
Contributor

@talavis talavis commented Mar 3, 2022

Should be combined with #337 in dds_cli

Add Mailcatcher and Minio to the development environment. This should enable a full zero-conf dev environment.

  • Mailcatcher catches emails and will make them available at localhost:1080
  • Minio is used as a local S3 storage, meaning that Safespring won't be needed
  • config.py has been updated with new defaults, matching the needs of the above services
  • Profiles have been added in docker-compose.yml
  • Readme is updated with a note about the new setup
  • docker-compose up will start database and backend
  • docker-compose --profile dev up will start database, backend, and mailcatcher
  • docker-compose --profile cli up will start database, backend, cli, minio, and mailcatcher
  • docker-compose --profile full-dev up will start database, backend, minio, mailcatcher, cli, and redis

docker-compose --profile cli up can be used to have a full local environment for development of both web and cli by starting a shell in dds_cli.

Running the "run tests" command

docker-compose -f docker-compose.yml -f tests/docker-compose-test.yml up --build --exit-code-from backend

will only start the testing backend and database.

  • Tests passing
  • [-] Black formatting
  • [-] Migrations for any changes to the database schema
  • Rebase/merge the dev branch
  • Note in the CHANGELOG

@codecov
Copy link

codecov bot commented Mar 3, 2022

Codecov Report

Merging #993 (1afb481) into dev (5282046) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #993   +/-   ##
=======================================
  Coverage   87.81%   87.81%           
=======================================
  Files          26       26           
  Lines        2905     2905           
=======================================
  Hits         2551     2551           
  Misses        354      354           
Impacted Files Coverage Δ
dds_web/config.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5282046...1afb481. Read the comment docs.

@talavis talavis mentioned this pull request Mar 3, 2022
3 tasks
@talavis talavis changed the title Add mailcatcher for dev emails Simplify setting up dev environment Mar 3, 2022
@talavis talavis marked this pull request as draft March 3, 2022 14:04
@talavis talavis marked this pull request as ready for review March 3, 2022 14:25
@talavis talavis requested review from i-oden and ewels March 3, 2022 14:25
Copy link
Member

@i-oden i-oden left a comment

Choose a reason for hiding this comment

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

Awesome!! Thanks for this 👏🏻 🎉

Copy link
Contributor

@alneberg alneberg left a comment

Choose a reason for hiding this comment

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

Amazing! Once I learnt how to use the docker-compose --profile it worked very smoothly!

@i-oden i-oden merged commit e5060c2 into dev Mar 4, 2022
@talavis talavis deleted the mail-catcher branch March 4, 2022 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
should have Important but not vital
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants