tiredofit / docker-osticket

Dockerized help desk application
MIT License
71 stars 56 forks source link

docker-compose up gets stuck at [scheduling] [1] Starting cron #20

Closed kvn95ss closed 1 year ago

kvn95ss commented 2 years ago

I want to deploy osticker over intranet. My config file is modified as follows -

Changing the main URL

Apart from this I've not made any other changes. The process hangs at the below command

osticket-app    | [services.d] starting services
osticket-app    | [services.d] done.
osticket-app    | 2022-08-29-10:52:28 [STARTING] ** [nginx] [1] Starting nginx 1.21.5
osticket-app    | 2022-08-29-10:52:28 [STARTING] ** [monitoring] [1] Starting Zabbix Agent (classic) 5.4.9
osticket-app    | 2022-08-29-10:52:28 [STARTING] ** [php-fpm] [1] Starting php-fpm 7.4.27
osticket-app    | 2022-08-29-10:52:28 [STARTING] ** [scheduling] [1] Starting cron

Leaving it for hours yields no change. Am I missing something?

maxthev commented 1 year ago

Hello, same here.

2022-11-23-10:20:57 [NOTICE] ** [osticket] Applying configuration file security
[cont-init.d] 30-osticket: exited 0.
[cont-init.d] 99-container: executing... 
[cont-init.d] 99-container: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2022-11-23-10:21:11 [STARTING] ** [nginx] [1] Starting nginx 1.21.5
2022-11-23-10:21:11 [STARTING] ** [monitoring] [1] Starting Zabbix Agent (classic) 5.4.9
2022-11-23-10:21:11 [STARTING] ** [php-fpm] [1] Starting php-fpm 7.4.27
2022-11-23-10:21:11 [STARTING] ** [scheduling] [1] Starting cron
maxthev commented 1 year ago

I realized it's not stuck, it's juste the end of the setup (the container is ready)

My problem was a bad "ports" config in my docker-compose, now it work.

Here is the "app" config I use :

  osticket-app:
    image: tiredofit/osticket
    container_name: osticket-app
    volumes:
      - ./data/:/www/osticket
      - ./logs/:/www/logs
    ports:
      - 8080:80
    environment:
      - CONTAINER_NAME=osticket-app
      - CRON_PERIOD=10
      - CONTAINER_ENABLE_MONITORING=FALSE

      - DB_HOST=osticket-db
      - DB_NAME=osticket
      - DB_USER=osticket
      - DB_PASS=password

      - SMTP_HOST=localhost
      - SMTP_PORT=25
      - SMTP_FROM=osticket@example.com
      - SMTP_TLS=0
      - SMTP_USER=osticket@example.com
      - SMTP_PASS=password

      - INSTALL_SECRET=somerandomlargecharacterstring
      - INSTALL_EMAIL=osticket@example.com
      - INSTALL_NAME=OSTicket Helpdesk

      - ADMIN_FIRSTNAME=Admin
      - ADMIN_LASTNAME=User
      - ADMIN_EMAIL=admin@example.com
      - ADMIN_USER=ostadmin
      - ADMIN_PASS=Password123
    restart: unless-stopped
kvn95ss commented 1 year ago

My problem was a bad "ports"

Can you elaborate on this? Can you tell the port entries which needed changing?

maxthev commented 1 year ago

The example docker-compose.yml doesn't have "ports:" because it assume that you use Traefik.

To test locally without Traefik, I removed the "labels:" section of the docker-compose.yml and added "ports:" section (see my example)

But the first time I used

    ports:
      - 8080:8080

instead of the right one :

    ports:
      - 8080:80

It worked well with my example docker-compose.yml

kvn95ss commented 1 year ago

ports: - 8080:80

So, the first port belongs to the external port, while the second port is inside the docker? If I want to use, say, poet 7777 to access the running docker instance, should the entry be as below?

ports: - 7777:80

maxthev commented 1 year ago

Exactly,

you should be able to access osticket on localhost:7777 with this setup.

kvn95ss commented 1 year ago

Exactly,

you should be able to access osticket on localhost:7777 with this setup.

THANKS!! It now works! Will try to set it up with user accounts and see how it goes!