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

[Feature]: Run project on Docker in Dev mode #151

Merged
merged 11 commits into from
May 6, 2022
Merged

Conversation

dsousa12
Copy link
Contributor

@dsousa12 dsousa12 commented May 5, 2022

Relates to #150

Screenshots (if visual changes)

It's not a visual change, but I leave some screenshots related with this change:
image

Hot reloading

  • On Frontend:
    image

  • On Backend:
    image

Proposed Changes

  • Create separated files to run docker as production mode and development mode (localhost mode)
    • Why? this way you don't need open 2 terminals to run a frontend and the backend manually, you can create the containers, and start or stop both or only one.

@xgeekshq/d-c-infra can review please?

This pull request is intended to close #150

@dsousa12 dsousa12 added the infra label May 5, 2022
@dsousa12 dsousa12 requested review from nunocaseiro and a team May 5, 2022 15:48
@dsousa12 dsousa12 self-assigned this May 5, 2022
@dsousa12
Copy link
Contributor Author

dsousa12 commented May 5, 2022

Note: it's necessary update the README

How to run:

  • docker-compose --file docker-compose.dev.yaml up -d: use this command to use the docker-compose.dev.yaml file.
    • This file use a different Dockerfiles (not the production mode files)

Copy link
Contributor

@nunocaseiro nunocaseiro left a comment

Choose a reason for hiding this comment

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

Before the merge we need to modify the github actions in order to use the prod versions of the docker files. Now we have an extra folder docker in each app. I believe we just need to update the docker build command on each github action workflow. Great job!

@dsousa12
Copy link
Contributor Author

dsousa12 commented May 6, 2022

Note: it's necessary update the README

How to run:

* `docker-compose --file docker-compose.dev.yaml up -d`: use this command to use the `docker-compose.dev.yaml` file.
  
  * This file use a different `Dockerfiles` (not the production mode files)

Working on this section in Wiki

@dsousa12
Copy link
Contributor Author

dsousa12 commented May 6, 2022

Before the merge we need to modify the github actions in order to use the prod versions of the docker files. Now we have an extra folder docker in each app. I believe we just need to update the docker build command on each github action workflow. Great job!

@nunocaseiro already done this change, can you see if everything it's ok?

@dsousa12 dsousa12 requested review from nunocaseiro and a team May 6, 2022 09:07
@nunocaseiro
Copy link
Contributor

@all-contributors please add @dsousa12 as contributor for code and docs

@allcontributors
Copy link
Contributor

@nunocaseiro

I've put up a pull request to add @dsousa12! 🎉

Copy link
Contributor

@nunocaseiro nunocaseiro left a comment

Choose a reason for hiding this comment

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

LGTM 🚀
Amazing job!

@dsousa12 dsousa12 merged commit 14e72d8 into main May 6, 2022
@dsousa12 dsousa12 deleted the feat-docker-dev-env branch May 6, 2022 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Run dev environment on Docker
2 participants