WuTheFWasThat / vimflowy

An open source productivity tool drawing inspiration from workflowy and vim

Home Page:https://www.wuthejeff.com/vimflowy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Socket issue behind reverse proxy docker images

expelledboy opened this issue · comments

So I have been using vimflowy for awhile now, but I always always have you refresh it if I dont use it for awhile. It crashes with this error.

Socket connection closed!

m</t.prototype.init/</</this.ws.onclose@https://vimflowy.betaplum.net/build/app.js:331:236860

It must have something to do with how its deployed. Any suggestions?

docker-compose.yml

version: '3'

volumes:
  vimflowy-db:
    external: true

networks:
  web:
    external: true

services:

  web:
    image: vimflowy/vimflowy
    volumes:
      - "vimflowy-db:/app/db"
    networks:
      -  web
    labels:
      - traefik.enable=true
      - traefik.docker.network=web
      - traefik.port=3000
      - traefik.frontend.rule=Host:${DOMAIN}
      - traefik.frontend.auth.forward.address=http://auth:4181
      - traefik.frontend.auth.forward.authResponseHeaders=X-Forwarded-User
      - traefik.frontend.auth.forward.trustForwardHeader=true

Reverse proxy

version: '3.7'

networks:
  web:
    external: true

services:
  proxy:
    image: traefik:1.7.20-alpine
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/localtime:/etc/localtime:ro
      - $PWD/traefik.toml:/traefik.toml
      - $PWD/acme.json:/acme.json
    networks:
      - web
    ports:
      - 3306:3306
      - 443:443
      - 80:80
    restart: always

  auth:
    image: funkypenguin/traefik-forward-auth
    environment:
      - OIDC_ISSUER=https://accounts.google.com
      - CLIENT_ID=${OAUTH_CLIENT_ID}
      - CLIENT_SECRET=${OAUTH_CLIENT_SECRET}
      - SECRET=${AUTH_SECRET}
      - WHITELIST=${EMAIL_WHITELIST}
      - COOKIE_DOMAINS=${DOMAIN}
      - AUTH_HOST=auth.${DOMAIN}
    networks:
      - web
    labels:
      - traefik.enable=true
      - traefik.docker.network=web
      - traefik.port=4181
      - traefik.frontend.rule=Host:auth.${DOMAIN}
      - traefik.frontend.auth.forward.address=http://auth:4181
      - traefik.frontend.auth.forward.trustForwardHeader=true

  whoami:
    image: containous/whoami
    networks:
      - web
    labels:
      - traefik.enable=true
      - traefik.docker.network=web
      - traefik.port=80
      - traefik.frontend.rule=Host:whoami.${DOMAIN}
      - traefik.frontend.auth.forward.address=http://auth:4181
      - traefik.frontend.auth.forward.authResponseHeaders=X-Forwarded-User
      - traefik.frontend.auth.forward.trustForwardHeader=true

maybe some kind of keepalive thing for the socket, pull requests welcome