Skip to content

Commit

Permalink
Add Dockerfile and update README.md (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reiaa authored Nov 6, 2021
1 parent 1869eab commit 053df20
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:16.11.1-bullseye-slim

ENV USER=mannele

RUN npm install -g typescript

RUN groupadd -r ${USER} && \
useradd --create-home --home /home/mannele -r -g ${USER} ${USER}

USER ${USER}
WORKDIR /home/mannele

COPY --chown=${USER}:${USER} . ./

RUN npm install && \
tsc && \
node dist/deploy-commands.js

ENTRYPOINT [ "node", "dist/main.js" ]
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ Mannele (Alsacian name for [Stutenkerl](https://en.wikipedia.org/wiki/Stutenkerl

<img src="screenshots/botresponse.png" alt="A screenshot showing the Bot response to calling the slash command for getting station schedules. The response includes a header with station name with an emoji representing the specific station (for instance the observatory station has a telescope emoji). Then under the header you can find lane stop times. Lanes are grouped by wether they are tramway lanes or bus lanes (once again an emoji is also present with the text to illustrate it). Each lane shows lane arrival times for each direction. Lane arrival times are specified in minutes. When a lane is soon to arrive the text is replaced with 'Now'." width="500"/>

# Docker Configuration

## Installation
**Linux:**
Install Docker.io
```bash
sudo apt install docker.io
```

**macOS:**
You can install Docker desktop [directly from the Docker website](https://www.docker.com/products/docker-desktop) or using `brew cask install docker`
## Usage
Commands to run on Mannele's directory
```bash
docker build . --tag mannele
docker run -d --name mannele mannele
```
Attention: Before launching the run command, be sure to have set up an .env file at the directory root where will be stored your bot's Discord token, CTS Token and Discord's Server Token. Also add the value below;
```bash
STATS_SLOT_COUNT=1
```

You may run this command to check out if Mannele is correctly running;
```bash
docker logs mannele
```

## Contributing
Don't hesitate to contribute by opening issues and pull requests to help with bugs and enhancements.

Expand Down

0 comments on commit 053df20

Please sign in to comment.