tobybatch / kimai2

Docker containers for the kimai2 web application including docker-compose and kubernetes/helm deployment.
MIT License
183 stars 97 forks source link

[BUG] Cannot search, filter or order tables #74

Closed rabidllama closed 4 years ago

rabidllama commented 4 years ago

Describe the bug Hi, it might be that I have missed something in the setup stage with docker-compose, but I can't seem to filter or sort any entries in lists. If I click on one of the headers, or search for text then nothing happens. However, if I it as per the evaluation instructions (using the Docker command rather than docker compose), things work as expected. The only thing that I have changed in the docker-compose file is added an IP to the TRUSTED_HOSTS parameter as I am running it on a server and then accessing it from another machine.

To Reproduce Steps to reproduce the behaviour:

  1. Start the container '...'
  2. Click on 'Customers'
  3. Click on search, enter text and press enter OR
  4. Click on a header of the table row

Desktop (please complete the following information):

Command used to run the container

Docker compose file (with passwords redacted)

version: '3.5'
services:

  sqldb:
    image: mysql:5.7
    environment:
      - MYSQL_DATABASE=kimai
      - MYSQL_USER=kimaiuser
      - MYSQL_PASSWORD=kimaipassword
      - MYSQL_ROOT_PASSWORD=changemeplease
    volumes:
      - /var/lib/mysql
    command: --default-storage-engine innodb
    restart: unless-stopped
    healthcheck:
      test: mysqladmin -pchangemeplease ping -h localhost
      interval: 20s
      start_period: 10s
      timeout: 10s
      retries: 3 

  nginx:
    build: compose
    ports:
      - 8001:80
    volumes:
      - ./nginx_site.conf:/etc/nginx/conf.d/default.conf
    restart: unless-stopped
    depends_on:
      - kimai
    volumes:
      - public:/opt/kimai/public
    healthcheck:
      test:  wget --spider http://nginx/health || exit 1 
      interval: 20s
      start_period: 10s
      timeout: 10s
      retries: 3 

  kimai:
    image: kimai/kimai2:fpm-alpine-1.5-prod
    environment:
      - APP_ENV=prod
      - TRUSTED_HOSTS=localhost,[ip address of server]
      - ADMINMAIL=admin@kimai.local
      - ADMINPASS=changemeplease
    volumes:
      - public:/opt/kimai/public
      - var:/opt/kimai/var
    restart: unless-stopped
    healthcheck:
      test: wget --spider http://nginx || exit 1
      interval: 20s
      start_period: 10s
      timeout: 10s
      retries: 3

  postfix:
    image: catatnight/postfix
    environment:
      maildomain: neontribe.co.uk
      smtp_user: kimai:kimai
    restart: unless-stopped
    restart: always

volumes:
    var:
    public:
kevinpapst commented 4 years ago

This is vey likely the fix: https://github.com/tobybatch/kimai2/pull/71/files#diff-5bcf1b5695cb99fcfed866e55e25b3c7R23

Schrolli91 commented 4 years ago

yes that should be the solution duplicate of #61 please take a look at #71

rabidllama commented 4 years ago

Great thanks :)

I just checked out the fix branch and did the docker-compose with that and everything now seems to work as expected.