Unix Sockets in Docker Compose

I’m trying to configure the app to utilize UNIX sockets in docker compose. I have the backend working without any crashes, but the frontend doesn’t seem to connect. Is this feature currently supported?

version: '3'

services:
  db:
    image: mariadb:10
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    environment:
      MYSQL_ROOT_PASSWORD: supersecret
      MYSQL_USER: vikunja
      MYSQL_PASSWORD: secret
      MYSQL_DATABASE: vikunja
  
  # Makes the socket world-writable
  tmp:
    image: busybox
    command: chmod -R 777 /tmp/run/vikunja
    volumes:
      - /tmp/run/vikunja

  api:
    image: vikunja/api
    environment:
      VIKUNJA_DATABASE_HOST: db
      VIKUNJA_DATABASE_PASSWORD: secret
      VIKUNJA_DATABASE_TYPE: mysql
      VIKUNJA_DATABASE_USER: vikunja
      VIKUNJA_DATABASE_DATABASE: vikunja
      VIKUNJA_SERVICE_FRONTENDURL: https://<redacted>/
      VIKUNJA_SERVICE_UNIXSOCKET: /tmp/run/vikunja/sock
      VIKUNJA_SERVICE_UNIXSOCKETMODE: 0o777
    volumes_from:
      - tmp

  frontend:
    image: vikunja/frontend
    environment:
      VIKUNJA_API_URL: /tmp/run/vikunja/sock
    ports:
      - 4321:80
    volumes_from:
      - tmp
    depends_on:
      - api

If you browse to http://127.0.0.1:4321 it produces the following (I’ve also tried unix://<PATH> as the URL):

There are no logs from within docker for the frontend, I get CORS errors from the browser.

That won’t work unless you can convince your browser to use the socket. As far as I know, browsers are not capable of that. The Vikunja frontend directly calls the api through the browser. Your browser needs to be able to call the api directly. The socket feature is meant to be used with a proxy.