Skip to content

Commit 2baae48

Browse files
committed
#11: add Dockerfile and a host reference
1 parent 961659b commit 2baae48

5 files changed

Lines changed: 65 additions & 0 deletions

File tree

cthulhu-3/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/chat-linker/app-config.json

cthulhu-3/Host.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
cthulhu-3
2+
=========
3+
4+
This is a service hosted at [DATA EXPUNGED].
5+
6+
Enabled end-user services:
7+
8+
- [chat-linker][]
9+
10+
[chat-linker]: chat-linker/Readme.md

cthulhu-3/chat-linker/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM node:6.9.5
2+
RUN git clone https://github.com/jt3k/chat-linker.git /usr/app/src && cd /usr/app/src && git checkout 8f54762de724ba9caa963b5ba908f0b29e230681
3+
RUN cd /usr/app/src && npm install # TODO: Not stable enough; migrate to yarn
4+
COPY app-config.json /usr/app/src/app-config.json
5+
WORKDIR /usr/app/src
6+
ENV NODE_ENV prod
7+
CMD ["node", "app.js"]

cthulhu-3/chat-linker/Readme.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
chat-linker
2+
===========
3+
4+
Deployment:
5+
6+
1. Copy `app-config.example.json` to `app.config.json` and set up the
7+
parameters.
8+
2. To delete old image:
9+
10+
```console
11+
$ docker stop codingteam-chat-linker
12+
$ docker rm codingteam-chat-linker
13+
```
14+
3. To build the image:
15+
16+
```console
17+
$ docker build -t=codingteam/chat-linker .
18+
```
19+
4. To start the image:
20+
21+
```console
22+
$ docker run -d --name codingteam-chat-linker codingteam/chat-linker
23+
```
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"jabber": {
3+
"connection": {
4+
"jid": "JABBERNAME@codingteam.org.ru",
5+
"password": "JABBERPASSWORD",
6+
"reconnect": true
7+
},
8+
"dev": {
9+
"room": "codingteam@conference.jabber.ru",
10+
"nick": "tg",
11+
"pingMs": 60000
12+
},
13+
"prod": {
14+
"room": "codingteam@conference.jabber.ru",
15+
"nick": "tg",
16+
"pingMs": 60000
17+
}
18+
},
19+
"telegram": {
20+
"BOT_TOKEN": "TELEGRAMTOKEN",
21+
"dev": {"id":TELEGRAMID,"title":"codingteam","type":"supergroup"},
22+
"prod": {"id":TELEGRAMID,"title":"codingteam","type":"supergroup"}
23+
}
24+
}

0 commit comments

Comments
 (0)