invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
418 stars 268 forks source link

Traefik/ Docker problem for v4.5.45 #617

Open creyD opened 2 months ago

creyD commented 2 months ago

Setup information docker-compose

Describe the bug

Site shows "Bad Gatway".

To reproduce Basically just do docker compose up with the dockerfile. My traefik is pretty much a standard configuration and works for other webpages.

  ninja_app:
    image: invoiceninja/invoiceninja:4.5.45
    container_name: ninja_app
    restart: unless-stopped
    volumes:
      - /data/ninja/public:/var/app/public
      - /data/ninja/storage:/var/app/storage
    environment:
      - APP_ENV=production
      - APP_DEBUG=0
      - APP_URL=https://MY_DOMAIN
      - APP_KEY=GENERATED_APP_KEY
      - APP_CIPHER=AES-256-CBC
      - DB_TYPE=mysql
      - DB_STRICT=false
      - DB_HOST=ninja_db
      - DB_PORT=3306
      - DB_DATABASE=ninja
      - DB_USERNAME=ninja
      - DB_PASSWORD=ninja
      - REQUIRE_HTTPS=true
      # Initial user
      - IN_USER_EMAIL=MY_EMAIL
      - IN_PASSWORD=MY_PASSWORd
    depends_on:
      - ninja_db
    networks:
      - ninja_net
      - traefik_web
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=traefik_web"
      - "traefik.http.routers.ninja_router.entrypoints=websecure"
      - "traefik.http.routers.ninja_router.rule=Host(`MY_DOMAIN`)"
      - "traefik.http.routers.ninja_router.tls=true"
      - "traefik.http.routers.ninja_router.tls.certresolver=default"
      - "traefik.http.services.ninja_router.loadbalancer.server.port=9000"

  ninja_db:
    container_name: ninja_db
    restart: unless-stopped
    networks:
      - ninja_net
    image: mysql:5.7
    volumes:
      - /data/ninja/db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=secretpass
      - MYSQL_USER=ninja
      - MYSQL_PASSWORD=ninja
      - MYSQL_DATABASE=ninja

networks:
  ninja_net:
  traefik_web:
    name: traefik_web
    external: true

Expected behavior I want to see the page and use traefik as the reverse proxy.

Screenshots/logs Logs for invoice ninja look good:


[10-Sep-2024 13:16:31] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[10-Sep-2024 13:16:31] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[10-Sep-2024 13:16:31] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[10-Sep-2024 13:16:31] NOTICE: fpm is running, pid 1
[10-Sep-2024 13:16:31] NOTICE: ready to handle connections```