john

john / Opengist

Last active 5 months ago

Like 0

Docker Compose to deploy Opengist with a Tailscale sidecar

john revised this gist 7 months ago · 6f31919

1 file changed, 16 insertions

serve-config.json (file created)
@@ -0,0 +1,16 @@
1 + {
2 + "TCP": {
3 + "443": {
4 + "HTTPS": true
5 + }
6 + },
7 + "Web": {
8 + "${TS_CERT_DOMAIN}:443": {
9 + "Handlers": {
10 + "/": {
11 + "Proxy": "http://127.0.0.1:6157"
12 + }
13 + }
14 + }
15 + }
16 + }

john revised this gist 7 months ago · 4068b8b

1 file changed, 16 deletions

serve-config.json (file deleted)
@@ -1,16 +0,0 @@
1 - {
2 - "TCP": {
3 - "443": {
4 - "HTTPS": true
5 - }
6 - },
7 - "Web": {
8 - "${TS_CERT_DOMAIN}:443": {
9 - "Handlers": {
10 - "/": {
11 - "Proxy": "http://127.0.0.1:6157"
12 - }
13 - }
14 - }
15 - }
16 - }

john revised this gist 2 years ago · b779522

1 file changed, 7 deletions

compose.yaml
@@ -23,13 +23,6 @@ services:
23 23 volumes:
24 24 - /opt/docker/opengist/data:/opengist
25 25 environment:
26 - OG_EXTERNAL_URL: ${OG_EXTERNAL_URL:-}
27 26 OG_GITHUB_CLIENT_KEY: ${OG_GITHUB_CLIENT_KEY:-}
28 27 OG_GITHUB_SECRET: ${OG_GITHUB_SECRET:-}
29 28 OG_SSH_GIT_ENABLED: false
30 - healthcheck:
31 - test: curl --fail http://localhost:6157/healthcheck | grep '"database":"ok","opengist":"ok"' || exit 1
32 - interval: 60s
33 - retries: 5
34 - start_period: 20s
35 - timeout: 10s

john revised this gist 2 years ago · 6dfbda5

2 files changed

opengist-compose.yaml renamed to compose.yaml

File renamed without changes

opengist-serve-config.json renamed to serve-config.json

File renamed without changes

john revised this gist 2 years ago · 0d27b59

No changes

john revised this gist 2 years ago · b603ac2

1 file changed, 1 insertion, 1 deletion

opengist-compose.yaml
@@ -21,7 +21,7 @@ services:
21 21 restart: unless-stopped
22 22 network_mode: service:ts-opengist
23 23 volumes:
24 - - "/opt/docker/opengist/data:/opengist"
24 + - /opt/docker/opengist/data:/opengist
25 25 environment:
26 26 OG_EXTERNAL_URL: ${OG_EXTERNAL_URL:-}
27 27 OG_GITHUB_CLIENT_KEY: ${OG_GITHUB_CLIENT_KEY:-}

john revised this gist 2 years ago · d41eb01

No changes

john revised this gist 2 years ago · b2a54aa

No changes

john revised this gist 2 years ago · 4c584bd

1 file changed, 16 insertions

opengist-serve-config.json (file created)
@@ -0,0 +1,16 @@
1 + {
2 + "TCP": {
3 + "443": {
4 + "HTTPS": true
5 + }
6 + },
7 + "Web": {
8 + "${TS_CERT_DOMAIN}:443": {
9 + "Handlers": {
10 + "/": {
11 + "Proxy": "http://127.0.0.1:6157"
12 + }
13 + }
14 + }
15 + }
16 + }

john revised this gist 2 years ago · 85a6584

1 file changed, 35 insertions

opengist-compose.yaml (file created)
@@ -0,0 +1,35 @@
1 + # opengist: Self-hosted pastebin powered by Git, open-source alternative to Github Gist.
2 + # https://github.com/thomiceli/opengist
3 +
4 + services:
5 + ts-opengist:
6 + image: tailscale/tailscale:latest
7 + container_name: ts-opengist
8 + restart: unless-stopped
9 + environment:
10 + TS_AUTHKEY: ${TS_AUTHKEY:?err}
11 + TS_HOSTNAME: gist
12 + TS_STATE_DIR: /var/lib/tailscale/
13 + TS_SERVE_CONFIG: /config/serve-config.json
14 + volumes:
15 + - /opt/docker/opengist/ts_data:/var/lib/tailscale/
16 + - /opt/docker/opengist/serve-config.json:/config/serve-config.json
17 +
18 + opengist:
19 + image: ghcr.io/thomiceli/opengist:1
20 + container_name: opengist
21 + restart: unless-stopped
22 + network_mode: service:ts-opengist
23 + volumes:
24 + - "/opt/docker/opengist/data:/opengist"
25 + environment:
26 + OG_EXTERNAL_URL: ${OG_EXTERNAL_URL:-}
27 + OG_GITHUB_CLIENT_KEY: ${OG_GITHUB_CLIENT_KEY:-}
28 + OG_GITHUB_SECRET: ${OG_GITHUB_SECRET:-}
29 + OG_SSH_GIT_ENABLED: false
30 + healthcheck:
31 + test: curl --fail http://localhost:6157/healthcheck | grep '"database":"ok","opengist":"ok"' || exit 1
32 + interval: 60s
33 + retries: 5
34 + start_period: 20s
35 + timeout: 10s