Skip to content

Commit

Permalink
[Add] docker deployment method
Browse files Browse the repository at this point in the history
  • Loading branch information
dickymuliafiqri committed Nov 29, 2021
1 parent ef84995 commit 5366165
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# syntax=docker/dockerfile:1

# Get image and set env
FROM node:lts
ENV NODE_ENV=production

# Set working directory
WORKDIR /app

# Copy all files on current dir to WORKDIR
COPY . .

# Install dependencies and build app
RUN npm install
RUN npm run build

# Let's be awesome!
CMD [ "npm", "start" ]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ Template for Telegram userbot using tgSnake based on GramJS
5. Run your bot with `npm start`
- `npm test` also provided to test your bot

### Docker

1. Clone this repository
2. Copy or rename `sample_config.env` to `config.env`
3. Fill all required field on `config.env`
- Run `generator.js` to get your `STRING_SESSION`
4. Run `docker build . --tag deadsnake`
5. Let's get awesome with `docker run deadsnake`

### Heroku

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"repository": "https://github.com/dickymuliafiqri/DeadSnakeTemplate",
"env": {
"HEROKU_APP_NAME": {
"description": "Heroku app name, used to identify your userbot app."
"description": "This is exactly the same with 'App name' field on upper of this page, used to identify your userbot app."
},
"HEROKU_API_KEY": {
"description": "Get this value from dashboard.heroku.com/account"
Expand Down

0 comments on commit 5366165

Please sign in to comment.