Browse Source

Add very initial dockerfile contributed by @prologic and @euank

pull/4/head
Daniel Oaks 6 years ago
commit
2e52ace806
3 changed files with 53 additions and 0 deletions
  1. 17
    0
      Dockerfile
  2. 19
    0
      docker-compose.yml
  3. 17
    0
      run.sh

+ 17
- 0
Dockerfile View File

@@ -0,0 +1,17 @@
1
+FROM golang:rc
2
+
3
+EXPOSE 6667/tcp 6697/tcp
4
+
5
+RUN apt-get install -y git
6
+
7
+RUN mkdir -p /go/src/github.com/oragono
8
+WORKDIR /go/src/github.com/oragono
9
+
10
+RUN git clone https://github.com/oragono/oragono.git
11
+WORKDIR /go/src/github.com/oragono/oragono
12
+RUN git submodule update --init
13
+RUN go build oragono.go
14
+
15
+COPY run.sh /go/src/github.com/oragono/oragono
16
+
17
+CMD ["./run.sh"]

+ 19
- 0
docker-compose.yml View File

@@ -0,0 +1,19 @@
1
+version: "3.2"
2
+
3
+services:
4
+  oragono:
5
+    image: oragono/oragono
6
+    ports:
7
+      - "6667:6667/tcp"
8
+      - "6697:6697/tcp"
9
+    deploy:
10
+      placement:
11
+        constraints:
12
+          - "node.role == manager"
13
+      restart_policy:
14
+        condition: on-failure
15
+      replicas: 1
16
+
17
+networks:
18
+  traefik:
19
+    external: true

+ 17
- 0
run.sh View File

@@ -0,0 +1,17 @@
1
+#!/bin/sh
2
+
3
+set -e
4
+
5
+if [ ! -f ./ircd.yaml ]; then
6
+  cp oragono.yaml ircd.yaml
7
+fi
8
+
9
+if [ ! -f ircd.db ]; then
10
+  ./oragono initdb
11
+fi
12
+
13
+if [ ! -f tls.crt ]; then
14
+  ./oragono mkcerts
15
+fi
16
+
17
+exec ./oragono run

Loading…
Cancel
Save