Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Update docker setup #48

Merged
merged 2 commits into from
Nov 2, 2017
Merged

Update docker setup #48

merged 2 commits into from
Nov 2, 2017

Conversation

soedar
Copy link
Contributor

@soedar soedar commented Nov 2, 2017

I've made some changes to the Docker setup.

  1. redis' data is persisted and connected to the hubot instance
  2. Create sample .env file to store per deployment configuration
  3. Use ENTRYPOINT instead of CMD (See Node v5.x.x does not exit on Ctrl-C in Docker container nodejs/node#4182)

I've also updated the README.md file, and remove old files that are not necessary

@soedar soedar requested review from fonglh, naomilwx and abeltay November 2, 2017 07:50
@@ -1,17 +1,11 @@
up:
up: build
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is build included here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've included build so that make up will always launch the latest version of the code. It might be confusing if someone does a git pull and make up but the container does not get updated

Copy link
Contributor

Choose a reason for hiding this comment

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

👌

@@ -1,8 +1,12 @@
FROM moexmen/node:8
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to use any functionality specific to moexmen/node?

Copy link
Contributor

Choose a reason for hiding this comment

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

not really, any node 8 will do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, but moexmen/node has some standardization across all the docker images that we are using. Such as timezone configuration and a WORKDIR setting.

Coming to think of it, I'll make a change to copy the files to the /app folder instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh I didn't now the name of the folder mattered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It didn't, but it's more of a standardization. So we know that if we enter a container built by us, we know that /app folder will continue the application code.

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think about using the base directory instead of /app? It seems clearer and more obvious to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean by base directory?

Copy link
Contributor

Choose a reason for hiding this comment

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

The first directory you see when you enter the container.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes. ADD . . will work because the WORKDIR is specified in the base image.

README.md Outdated
1. Clone this repository
1. Copy sample env file `cp .env.example .env`
1. Modify the env file with secrets `$EDITOR .env`
1. Build image `make build`
Copy link
Contributor

Choose a reason for hiding this comment

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

If build is included in up, we don't need this step.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call 👍

Copy link
Contributor

@fonglh fonglh left a comment

Choose a reason for hiding this comment

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

We have a how to run on production doc in our internal repo also. When this is setup we should port the docker steps over too.

@soedar soedar merged commit 4aa6674 into master Nov 2, 2017
@soedar soedar deleted the update-dockerize branch November 2, 2017 13:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants