Skip to content

Commit

Permalink
add a Dockerfile
Browse files Browse the repository at this point in the history
Thanks to @jarededwards
  • Loading branch information
fharper committed Aug 14, 2023
1 parent dc8dee9 commit 84d343d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:20-alpine3.17

WORKDIR /

COPY . .

RUN npm install

EXPOSE 8080

CMD ["node", "index.js"]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,19 @@ First, you need to run the application on a cloud provider: you could run it loc

_Future versions of this app will probably use templating, so this stupid implementation of `WELCOME_PART1` & `WELCOME_PART2` will be things of the past._

#### Run

Once it's done, you can run the application using the `node index.js` command. You would be advised to run it as a service to ensure it's always running, and restart when there is an issue (running it with something like [pm2](https://github.com/Unitech/pm2) `pm2 start index.js`). Note that the app won't work at first as you need to update the other variables from the [.env file](.env)), but you won't be able to do it before you create the Slack application.

#### Docker

You can also run the application using Docker

```shell
docker build -t warm-welcome .
docker run -p 80:8080 warm-welcome
```

### Slack Application

First, you need to create a new Slack application. To do so, connect to your Slack Workspace in the browser, and go to [Your Apps](https://api.slack.com/apps). Click on the `Create an app` button, and choose the second option named `From an app manifest`. On step 1 of 3 screens, pick the workspace you want to welcome people, and click `Next`.
Expand Down

0 comments on commit 84d343d

Please sign in to comment.