linuxserver / Heimdall

An Application dashboard and launcher
MIT License
7.46k stars 540 forks source link

MySQL/PostgreSQL connection doesn't work within Docker #1344

Closed Enrico-KZV closed 1 month ago

Enrico-KZV commented 1 month ago

I've tried and tried to get Heimdall to work with an SQL connection within Docker, but the furthest I get is that Heimdall creates all the tables and then goes right back to using SQLite. I've only found this out through using Fatrace since Heimdall itself shows nothing of this within its logs.

When installing locally, everything works without issues. I'm not sure what's going wrong here.

My Docker Compose file:

version: '3.8'
volumes:
  data:
services:
  heimdall:
    image: linuxserver/heimdall
    restart: always
    ports:
      - "81:80"
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - DB_CONNECTION=mysql
      - DB_HOST=db
      - DB_PORT=3306
      - DB_USERNAME=user
      - DB_PASSWORD=password
      - DB_DATABASE=heimdall
  db:
    image: mysql:5.7
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: heimdall
      MYSQL_USER: user
      MYSQL_PASSWORD: password
    ports:
      - 3306:3306
    volumes:
      - data:/var/lib/mysql
  phpmyadmin:
    image: phpmyadmin
    restart: always
    ports:
      - 8080:80
    environment:
      - PMA_ARBITRARY=1

networks:
  default:
    name: heimdall

2024-06-05 14_55_37-Start 2024-06-05 14_57_12-Window