containerize application#1
Open
maltegrosse wants to merge 4 commits into
Open
Conversation
Owner
juliendiot42
left a comment
There was a problem hiding this comment.
Thank you very much for this MR, I had some comments.
|
|
||
| Run: | ||
|
|
||
| ```docker run -it juliendiot42/slack-auto-translate:latest ``` |
Owner
There was a problem hiding this comment.
-it here is not necessary because there is no need to go into the container.
Comment on lines
+18
to
+23
| }else{ | ||
| fromToTable = [ | ||
| { from: "general", to: "general-autotranslate" }, | ||
| { from: "test-auto-translate", to: "test-auto-translate-2" }, | ||
| { from: "random", to: "random-autotranslate" }, | ||
| ]; |
Owner
There was a problem hiding this comment.
This should be removed since now the channels are specified as environment variables.
Comment on lines
+6
to
+7
| # If you are building your code for production | ||
| # RUN npm ci --omit=dev |
Owner
There was a problem hiding this comment.
Yes, the image is for production.
| @@ -0,0 +1,2 @@ | |||
| node_modules | |||
| npm-debug.log No newline at end of file | |||
Owner
There was a problem hiding this comment.
The .env file should also be in the .dockerignore. It contains the API's credentials.
You can probably use the .gitignore.
Comment on lines
+96
to
+101
| ```docker run -it juliendiot42/slack-auto-translate:latest ``` | ||
|
|
||
| Set environment variables: | ||
| - BOT_TOKEN: bot token | ||
| - SLACK_APP_TOKEN: slack api token | ||
| - CHANNEL_LISTS: "from_channel:to_channel,2nd_chan_from:2nd_chan_to" |
Owner
There was a problem hiding this comment.
The environment variables should be specified to the docker run command.
Author
|
added the fixes as requested |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
first PR to containerize the application
(untested as no slack token available yet)