Browse Source

Initial version

0.0.42
Chris Smith 8 years ago
commit
385b1e0ed0
4 changed files with 78 additions and 0 deletions
  1. 19
    0
      Dockerfile
  2. 36
    0
      README.md
  3. 13
    0
      tapchat.expect
  4. 10
    0
      tapchat.sh

+ 19
- 0
Dockerfile View File

@@ -0,0 +1,19 @@
1
+FROM node:0.10 
2
+MAINTAINER Chris Smith <chris87@gmail.com>
3
+
4
+RUN npm install -g --unsafe-perm \
5
+  coffee-script@1.7.1 \
6
+  tapchat@0.0.42
7
+
8
+RUN \
9
+  apt-get update && \
10
+  apt-get -y install \
11
+    expect
12
+
13
+ADD tapchat.expect tapchat.sh /
14
+
15
+EXPOSE 8067
16
+
17
+VOLUME /.tapchat
18
+
19
+CMD ["sh", "/tapchat.sh"]

+ 36
- 0
README.md View File

@@ -0,0 +1,36 @@
1
+# TapChat Dockerfile
2
+
3
+This is a dockerised version of TapChat
4
+
5
+## Usage
6
+
7
+Create a named volume to persist data:
8
+
9
+```bash
10
+docker volume create --name tapchat-data
11
+```
12
+
13
+Pull the image for the desired version of TapChat:
14
+
15
+```bash
16
+docker pull csmith/tapchat:0.0.42
17
+```
18
+
19
+Start a container, exposing the TapChat port:
20
+
21
+```bash
22
+docker run -d --name tapchat \
23
+              --restart always \
24
+              -p 8067:8067 \
25
+              -v tapchat-data:/.tapchat \
26
+              csmith/tapchat:0.0.42
27
+```
28
+
29
+## Defaults
30
+
31
+TapChat will be configured to listen on the default port of 8067,
32
+and a default account with the username **admin** and password
33
+**admin** will be created.
34
+
35
+You can access a web interface at https://<ip>:8067/ in order to
36
+change the password or create a new account.

+ 13
- 0
tapchat.expect View File

@@ -0,0 +1,13 @@
1
+#!/usr/local/bin/expect --
2
+
3
+spawn tapchat start -f
4
+expect "port"
5
+send "8067\n"
6
+expect "username"
7
+send "admin\n"
8
+expect "password"
9
+send "admin\n"
10
+expect "SSL fingerprint"
11
+sleep 2
12
+close
13
+wait

+ 10
- 0
tapchat.sh View File

@@ -0,0 +1,10 @@
1
+#!/bin/sh
2
+
3
+export HOME=/
4
+
5
+if [ ! -f /var/lib/tapchat.pm ]; then 
6
+  expect /tapchat.expect 
7
+fi
8
+
9
+tapchat start -f
10
+