From: Alviro Iskandar Setiawan <[email protected]>
To: Ammar Faizi <[email protected]>,
Michael William Jonathan <[email protected]>
Cc: Alviro Iskandar Setiawan <[email protected]>,
GNU/Weeb Mailing List <[email protected]>
Subject: [PATCH server-haj002 v1 5/6] Add elk server using docker
Date: Thu, 13 Jul 2023 17:28:49 +0200 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
elk is a nimble Mastodon web client.
Link: https://t.me/GNUWeeb/807595
Cc: Michael William Jonathan <[email protected]>
Signed-off-by: Alviro Iskandar Setiawan <[email protected]>
---
elk/.gitignore | 2 ++
elk/docker-compose.yml | 30 ++++++++++++++++++++++++++++++
elk/start.sh | 23 +++++++++++++++++++++++
3 files changed, 55 insertions(+)
create mode 100644 elk/.gitignore
create mode 100644 elk/docker-compose.yml
create mode 100644 elk/start.sh
diff --git a/elk/.gitignore b/elk/.gitignore
new file mode 100644
index 0000000..d7fae55
--- /dev/null
+++ b/elk/.gitignore
@@ -0,0 +1,2 @@
+/elk_git/
+/elk-storage/
diff --git a/elk/docker-compose.yml b/elk/docker-compose.yml
new file mode 100644
index 0000000..0ec1c6f
--- /dev/null
+++ b/elk/docker-compose.yml
@@ -0,0 +1,30 @@
+version: "2.1"
+
+networks:
+ elk-net:
+ enable_ipv6: true
+ driver: bridge
+ ipam:
+ driver: default
+ config:
+ - subnet: 10.4.5.0/24
+ gateway: 10.4.5.1
+ - subnet: fcdd:af::/64
+ gateway: fcdd:af::1
+ driver_opts:
+ com.docker.network.bridge.name: elk-net
+
+services:
+ elk:
+ networks:
+ elk-net:
+ ipv4_address: 10.4.5.2
+ ipv6_address: fcdd:af::2
+ build:
+ context: ./elk_git
+ dockerfile: Dockerfile
+ volumes:
+ # make sure this directory has the same ownership as the elk user from the Dockerfile
+ # otherwise Elk will not be able to store configs for accounts
+ # e.q. mkdir ./elk-storage; sudo chown 911:911 ./elk-storage
+ - './elk-storage:/elk/data'
diff --git a/elk/start.sh b/elk/start.sh
new file mode 100644
index 0000000..6662d92
--- /dev/null
+++ b/elk/start.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+#
+# For an unknown reason, a git submodule of elk cannot be built
+# using docker-compose up --build. This script will clone
+# the elk repository and build the docker image if there is
+# no available elk instance on the machine.
+#
+
+parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P );
+
+cd "${parent_path}";
+
+if [ ! -f "${parent_path}/elk_git" ]; then
+ mkdir -pv ./elk-storage;
+ chown -R 911:911 ./elk-storage;
+fi;
+
+if [ ! -f "${parent_path}/elk_git/Dockerfile" ]; then
+ git clone https://github.com/elk-zone/elk.git "${parent_path}/elk_git";
+fi;
+
+docker-compose up --build -d;
--
Alviro Iskandar Setiawan
next prev parent reply other threads:[~2023-07-13 15:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 15:28 [PATCH server-haj002 v1 0/6] Server update and new service elk.gnuweeb.org Alviro Iskandar Setiawan
2023-07-13 15:28 ` [PATCH server-haj002 v1 1/6] init_net: Allow trusted traffic from/to local addresses Alviro Iskandar Setiawan
2023-07-13 15:28 ` [PATCH server-haj002 v1 2/6] mastodon: Enable IPv6 for the masto-net network Alviro Iskandar Setiawan
2023-07-13 15:28 ` [PATCH server-haj002 v1 3/6] mastodon: Fix DNS resolution error Alviro Iskandar Setiawan
2023-07-13 15:28 ` [PATCH server-haj002 v1 4/6] mastodon: Move data directory inside the git project Alviro Iskandar Setiawan
2023-07-13 15:28 ` Alviro Iskandar Setiawan [this message]
2023-07-13 15:28 ` [PATCH server-haj002 v1 6/6] setup.txt: Add elk setup instructions Alviro Iskandar Setiawan
2023-07-13 15:42 ` [PATCH server-haj002 v1 0/6] Server update and new service elk.gnuweeb.org Ammar Faizi
2023-07-13 16:47 ` Alviro Iskandar Setiawan
2023-07-13 16:54 ` Ammar Faizi
2023-07-14 2:25 ` Michael William Jonathan
2023-07-14 10:32 ` Alviro Iskandar Setiawan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox