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

Adds Docker files as a milestone for issue-4 #65

Merged
merged 1 commit into from Nov 9, 2019

Conversation

@Reza-Rajabi
Copy link
Collaborator

Reza-Rajabi commented Nov 7, 2019

What is this pull request:
This will add Dockerfile and .dockerignore to the project. So that we can run the project without installing node packages like so:

$ docker-compose up --build

and more importantly, we can ship the Docker image to Kubernetes later on.

@Reza-Rajabi Reza-Rajabi mentioned this pull request Nov 7, 2019
3 of 5 tasks complete
@Reza-Rajabi Reza-Rajabi added this to In progress/Review in Main Nov 7, 2019
@manekenpix

This comment has been minimized.

Copy link
Collaborator

manekenpix commented Nov 7, 2019

@Reza-Rajabi is your problem related to issue #48?

@Reza-Rajabi

This comment has been minimized.

Copy link
Collaborator Author

Reza-Rajabi commented Nov 7, 2019

@manekenpix Yes it is. Thank you for catching that. I didn't include Redis.

@manekenpix

This comment has been minimized.

Copy link
Collaborator

manekenpix commented Nov 7, 2019

@humphd mentioned in #4:

See https://hub.docker.com/_/redis. We can just pull existing images for it.

I tried a docker-compose file that pulls an existing redis image and it works. Feel free to add it to your PR:

version: '3'
services:
  telescope:
    build: .
    depends_on: 
      - redis
    ports:
      - "3000:3000"
    network_mode: host
  redis:
    image: redis:latest
    ports:
      - "6379:6379"

docker-compose up --build for deployment

@manekenpix manekenpix self-requested a review Nov 7, 2019
@Reza-Rajabi

This comment has been minimized.

Copy link
Collaborator Author

Reza-Rajabi commented Nov 7, 2019

@manekenpix That's true. Thank you Josue, always helpful. I will add that compose file.

Copy link
Collaborator

manekenpix left a comment

I think it looks great, maybe you could include some minimal info in README.md about deployment, and mentioned @jerryshueh's comment on slack about docker and Windows.

@birtony

This comment has been minimized.

Copy link
Collaborator

birtony commented Nov 7, 2019

@Reza-Rajabi if this PR fixes #4, could you, please, update the title and the description accordingly?

  • The title and the description should probably start with Fixes #4
  • Fixes is not recognized as a keyword in the title, however, it is convenient for other contributors to see what is the PR about right in the list of all PRs
  • Mentioning Fixes in the description will allow us to automatically close the related issue once the PR is merged
  • For reference, check #66, as an example. When we go to #20 we can see that it May be fixed by #66
@Reza-Rajabi

This comment has been minimized.

Copy link
Collaborator Author

Reza-Rajabi commented Nov 8, 2019

@Reza-Rajabi if this PR fixes #4, could you, please, update the title and the description accordingly?

  • The title and the description should probably start with Fixes #4
  • Fixes is not recognized as a keyword in the title, however, it is convenient for other contributors to see what is the PR about right in the list of all PRs
  • Mentioning Fixes in the description will allow us to automatically close the related issue once the PR is merged
  • For reference, check #66, as an example. When we go to #20 we can see that it May be fixed by #66

@birtony Thank you for catching this. Your point is totally true. The reason I didn't follow this style is that we are not done with this issue, and the commit is actually one milestone of maybe 4 milestones or more. I appreciate your attention. Please keep watching to keep the project clean together.

@Reza-Rajabi

This comment has been minimized.

Copy link
Collaborator Author

Reza-Rajabi commented Nov 8, 2019

@manekenpix Do I need to change something in here? I will add the document once it gets merged though.
I need one more review as well and I don't like to assign it to somebody myself, do you have any suggestion for that?

@manekenpix

This comment has been minimized.

Copy link
Collaborator

manekenpix commented Nov 8, 2019

I think it'd be better to add the changes to the document here, that way we can have all the initial commits related to docker in this PR and it'll be easier to review the history of the repo in the future. What do you think?

Other than that, ready to get merged 👍

@Reza-Rajabi

This comment has been minimized.

Copy link
Collaborator Author

Reza-Rajabi commented Nov 8, 2019

I think it'd be better to add the changes to the document here, that way we can have all the initial commits related to docker in this PR and it'll be easier to review the history of the repo in the future. What do you think?

Other than that, ready to get merged 👍

true. I will make a commit to address the doc change.

@Reza-Rajabi Reza-Rajabi force-pushed the Reza-Rajabi:issue-4-docker branch from 3186e1e to a18e3fd Nov 8, 2019
@Reza-Rajabi

This comment has been minimized.

Copy link
Collaborator Author

Reza-Rajabi commented Nov 8, 2019

@manekenpix I somewhat rebased. So only see the last commit for all changes related to Docker including the CONTRIBUTING.md

@manekenpix

This comment was marked as resolved.

Copy link
Collaborator

manekenpix commented Nov 8, 2019

@Reza-Rajabi I can still see a lot of commits that are already merged
Screenshot_20191108_081933

@humphd

This comment has been minimized.

Copy link
Contributor

humphd commented Nov 8, 2019

@Reza-Rajabi it looks to me like you can just reset your issue-4-docker branch to the 6c1aa4f commit and rebase:

git checkout -B issue-4-docker 6c1aa4f125c5d2b562c8439880ccebac2e18dd2a
git checkout master
git pull upstream master
git checkout issue-4-docker
git rebase master
git push origin issue-4-docker -f

We should make sure people don't merge with master ever, only rebase.

@Reza-Rajabi Reza-Rajabi force-pushed the Reza-Rajabi:issue-4-docker branch 3 times, most recently from 7731343 to de20eba Nov 8, 2019
@Reza-Rajabi Reza-Rajabi closed this Nov 8, 2019
@Reza-Rajabi Reza-Rajabi force-pushed the Reza-Rajabi:issue-4-docker branch from de20eba to 76e935a Nov 8, 2019
Main automation moved this from In progress/Review to Closed Nov 8, 2019
@Reza-Rajabi

This comment has been minimized.

Copy link
Collaborator Author

Reza-Rajabi commented Nov 8, 2019

@humphd @manekenpix My apologies! I tried to clean that mess and now the pull request got closed. So do I need to reopen this pull request or I need to make a new pull request?

@manekenpix

This comment has been minimized.

Copy link
Collaborator

manekenpix commented Nov 8, 2019

@Reza-Rajabi you can just reopen it. No worries 👍

@Reza-Rajabi Reza-Rajabi reopened this Nov 8, 2019
Main automation moved this from Closed to In progress/Review Nov 8, 2019
@Reza-Rajabi Reza-Rajabi force-pushed the Reza-Rajabi:issue-4-docker branch from 566eff1 to d89fe64 Nov 8, 2019
@Reza-Rajabi Reza-Rajabi closed this Nov 8, 2019
@Reza-Rajabi Reza-Rajabi force-pushed the Reza-Rajabi:issue-4-docker branch from d89fe64 to 76e935a Nov 8, 2019
Main automation moved this from In progress/Review to Closed Nov 8, 2019
@Reza-Rajabi Reza-Rajabi reopened this Nov 9, 2019
Main automation moved this from Closed to In progress/Review Nov 9, 2019
@Reza-Rajabi

This comment has been minimized.

Copy link
Collaborator Author

Reza-Rajabi commented Nov 9, 2019

@manekenpix I will add the doc changes after these gets merged. I don't want to risk on rebase again.

@humphd
humphd approved these changes Nov 9, 2019
COPY . .

ENV NODE_ENV production
ENV PORT 3000

This comment has been minimized.

Copy link
@humphd

humphd Nov 9, 2019

Contributor

These should both work with our .env, and override via environment variables, but we should confirm, since we expect to be able to set them via .env

@humphd humphd requested a review from manekenpix Nov 9, 2019
@Reza-Rajabi Reza-Rajabi added the on-board label Nov 9, 2019
@humphd humphd merged commit 288fcfd into Seneca-CDOT:issue-4 Nov 9, 2019
Main automation moved this from In progress/Review to Done Nov 9, 2019
@humphd

This comment has been minimized.

Copy link
Contributor

humphd commented Nov 9, 2019

@Reza-Rajabi it looks like this PR was made against the wrong branch, so I've merged it, but not into master. Should it have been against master? If so I'll merge it there.

@humphd humphd mentioned this pull request Nov 9, 2019
@humphd

This comment has been minimized.

Copy link
Contributor

humphd commented Nov 9, 2019

Opened #113 so we can fix this. Please comment there.

@Reza-Rajabi Reza-Rajabi deleted the Reza-Rajabi:issue-4-docker branch Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Main
Done
4 participants
You can’t perform that action at this time.