| 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 |
| 36 |
Docker Compose to deploy Opengist with a Tailscale sidecar
Revision 4c584bdd38a15cd69f4f62d02b24615a5b1fca61
| 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 | } |
| 17 |