linuxserver / docker-lychee

GNU General Public License v3.0
45 stars 16 forks source link

What to put at the Database Host? #26

Closed thepenguinthatwants closed 5 years ago

thepenguinthatwants commented 5 years ago

Hi LinuxServer!

I am trying to figure out how to use lychee on my traefik stack. For now I can start it and navigate to the installation page where is asks more details about database.

Filling the information seems to work but it doesnt allow me to go forward. Not sure what to put into the database host nor that sure if lychee and mariadb is really connected.

Host OS Debian 9

Here is my docker-compose.yml


---
version: "3"
services:
  lychee:
    image: linuxserver/lychee
    container_name: lychee
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Stockholm
    volumes:
      - ./config:/config
      - ./pictures:/pictures
    restart: unless-stopped
    networks:
      - web
      - lychee
    labels:
      - traefik.enable=true
      - traefik.port=80
      - traefik.backend=lychee
      - traefik.frontend.rule=Host:lychee.example.xyz
      - traefik.docker.network=web

  db:
    image: mariadb
    container_name: lychee_db
    restart: unless-stopped
    networks:
     - lychee
    volumes:
     - ./db:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: lychee
      MYSQL_DATABASE: lychee
      MYSQL_USER: lychee
      MYSQL_PASSWORD: lychee
    labels:
      - traefik.enable=false

networks:
  web:
    external: true
  lychee:
    external: false
aptalca commented 5 years ago

Can't help you with traefik but the mysql url would be the container name of your mariadb instance as long as they are both in the same user defined bridge network

thepenguinthatwants commented 5 years ago

Hi thanks!

the container name was the name of the host. Thanks..