Troubleshooting AnswerHub Docker Startup

For AnswerHub versions 1.8 and 1.9.

If you need to refresh the Docker pieces, use the following command and it will re-pull and rebuild the Docker container:
$ docker-compose build —-pull —-no-cache

To see everything running in docker:
Once the docker container has started up, use the following command to check and ensure all the docker services are up and running. You should see output similar to the text below:
$ docker ps

To completely Nuke your Docker setup and start over:
$ docker-compose rm -v

Looking at logs for a container:
$ docker ps

| ~/opt/answerhub/bin @ Jesses-Work-MBP (Jesse) 

$ docker logs --follow a4de34cbd731

If your localhost address gets blocked for some reason, then you can use a different database.url based on the docker version you are using. The property will be host.docker.internal for Docker version v18.3. For other versions of Docker, please refer to Docker’s release notes for the correct local DNS NAME property.

If you still cannot get your local instance of AnswerHub running, you might need to do the following:

  • You may need to check your file:
    $ cat ../share/conf/
    • Double check that the
    • Double check that the, database.user=test, data.password=test, and database.url=ahub-mysql.
  • You may need to delete your mysql file in share/db/mysql:
    $ rm -rf ../share/db/mysql $ ls -al ../share/db/mysql
    Total should be 0 $ docker-compose up.
  • You may need to navigate to your docker-compose.yml file, search for the AnswerHub container and add the following line to the end of the container:
      - mysql

Now your AnswerHub container configuration should look like the following:

container_name: answerhub-container
    build: ../docker/answerhub
      - ../share/customizations:/opt/answerhub/teamhub/customizations
      - ../share/conf:/opt/answerhub/teamhub/conf
      - ../share/sites:/opt/answerhub/teamhub/sites
      - ../share/logs:/opt/answerhub/teamhub/logs
      - TH_PROFILE
      - "8009"
          memory: 3G
          memory: 2G
      - mysql

You should be able to go to http://localhost:80 and your site should show up once the docker-compose up finishes processing.