瀏覽代碼

Merge pull request #19 from oragono/stable_updates

Stable updates
stable
Shivaram Lingamneni 4 年之前
父節點
當前提交
35878b7dc0
沒有連結到貢獻者的電子郵件帳戶。
共有 3 個檔案被更改,包括 104 行新增11 行删除
  1. 96
    1
      README.md
  2. 6
    1
      docker-compose.yml
  3. 2
    9
      run.sh

+ 96
- 1
README.md 查看文件

@@ -1,3 +1,98 @@
1 1
 # Oragono Docker
2 2
 
3
-This repo holds Oragono's Dockerfiles and such.
3
+This repo holds [Oragono](https://github.com/oragono/oragono)'s Dockerfiles and
4
+related materials.
5
+
6
+## Tags
7
+
8
+The following tags are available:
9
+
10
+ * `latest` - latest stable release
11
+ * `dev` - latest development version (may be unstable)
12
+
13
+## Quick start
14
+
15
+The Oragono docker image is designed to work out of the box - it comes with a
16
+usable default config and will automatically generate self-signed TLS
17
+certificates. To get a working ircd, all you need to do is run the image and
18
+expose the ports:
19
+
20
+```shell
21
+docker run --name oragono -d -P oragono/oragono:tag
22
+```
23
+
24
+This will start Oragono and listen on ports 6667 (plain text) and 6697 (TLS).
25
+The first time Oragono runs it will create a config file with a randomised
26
+oper password. This is output to stdout, and you can view it with the docker
27
+logs command:
28
+
29
+```shell
30
+# Assuming your container is named `oragono`; use `docker container ls` to
31
+# find the name if you're not sure.
32
+docker logs oragono
33
+```
34
+
35
+You should see a line similar to:
36
+
37
+```
38
+Oper username:password is dan:cnn2tm9TP3GeI4vLaEMS
39
+```
40
+
41
+## Persisting data
42
+
43
+Oragono has a persistent data store, used to keep account details, channel
44
+registrations, and so on. To persist this data across restarts, you can mount
45
+a volume at /ircd.
46
+
47
+For example, to create a new docker volume and then mount it:
48
+
49
+```shell
50
+docker volume create oragono-data
51
+docker run -d -v oragono-data:/ircd -P oragono/oragono:tag
52
+```
53
+
54
+Or to mount a folder from your host machine:
55
+
56
+```shell
57
+mkdir oragono-data
58
+docker run -d -v $(PWD)/oragono-data:/ircd -P oragono/oragono:tag
59
+```
60
+
61
+## Customising the config
62
+
63
+Oragono's config file is stored at /ircd/ircd.yaml. If the file does not
64
+exist, the default config will be written out. You can copy the config from
65
+the container, edit it, and then copy it back:
66
+
67
+```shell
68
+# Assuming that your container is named `oragono`, as above.
69
+docker cp oragono:/ircd/ircd.yaml .
70
+vim ircd.yaml # edit the config to your liking
71
+docker cp ircd.yaml oragono:/ircd/ircd.yaml
72
+```
73
+
74
+You can use the `/rehash` command to make Oragono reload its config, or
75
+send it the HUP signal:
76
+
77
+```shell
78
+docker kill -HUP oragono
79
+```
80
+
81
+## Using custom TLS certificates
82
+
83
+TLS certs will by default be read from /ircd/tls.crt, with a private key
84
+in /ircd/tls.key. You can customise this path in the ircd.yaml file if
85
+you wish to mount the certificates from another volume. For information
86
+on using Let's Encrypt certificates, see
87
+[this manual entry](https://github.com/oragono/oragono/blob/master/docs/MANUAL.md#how-do-i-use-lets-encrypt-certificates).
88
+
89
+## Using docker-compose
90
+
91
+This repository contains a sample docker-compose file which can be used
92
+to start an Oragono instance with ports exposed and data persisted in
93
+a docker volume. Simply download the file and then bring it up:
94
+
95
+```shell
96
+curl -O https://raw.githubusercontent.com/oragono/oragono-docker/master/docker-compose.yml
97
+docker-compose up -d
98
+```

+ 6
- 1
docker-compose.yml 查看文件

@@ -2,10 +2,12 @@ version: "3.2"
2 2
 
3 3
 services:
4 4
   oragono:
5
-    image: oragono/oragono
5
+    image: oragono/oragono:latest
6 6
     ports:
7 7
       - "6667:6667/tcp"
8 8
       - "6697:6697/tcp"
9
+    volumes:
10
+      - data:/ircd
9 11
     deploy:
10 12
       placement:
11 13
         constraints:
@@ -13,3 +15,6 @@ services:
13 15
       restart_policy:
14 16
         condition: on-failure
15 17
       replicas: 1
18
+
19
+volumes:
20
+  data:

+ 2
- 9
run.sh 查看文件

@@ -22,15 +22,8 @@ if [ ! -f "/ircd/ircd.yaml" ]; then
22 22
     mv /tmp/ircd2.yaml /ircd/ircd.yaml
23 23
 fi
24 24
 
25
-# make db
26
-if [ ! -f "/ircd/ircd.db" ]; then
27
-    /ircd-bin/oragono initdb
28
-fi
29
-
30
-# make self-signed certs
31
-if [ ! -f "/ircd/tls.key" ]; then
32
-    /ircd-bin/oragono mkcerts
33
-fi
25
+# make self-signed certs if they don't already exist
26
+/ircd-bin/oragono mkcerts
34 27
 
35 28
 # run!
36 29
 exec /ircd-bin/oragono run

Loading…
取消
儲存