kcal-app / kcal-docker

Docker Compose template for the kcal app.
MIT License
10 stars 3 forks source link

Unable to connect after installing with docker-compose #1

Open zkvvoob opened 2 years ago

zkvvoob commented 2 years ago

Hello,

I was really looking forward to self-hosting kcal on my machine, because it looked very promising.

I've only tweaked the docker-compose.yml and .env files minimally to account for the fact that I already have a database. Below is their content.

I'm also attaching a screenshot of the stack in Portainer - all 4 containers seem to running fine, the logs don't show and errors - and yet, when I try to open one of the kcal-web links, I'm greeting with a message that my browser is unable to connect.

SCR-20220809-lgu

docker-compose.yml

version: '3'
services:
  app:
    image: kcalapp/kcal
    container_name: kcal-app
    restart: unless-stopped
    tty: true
    working_dir: /app
    env_file: .env
    volumes:
      - 'app-public:/app/public/'
      - './etc/php/php.ini:/usr/local/etc/php/conf.d/local.ini'
    networks:
      - kcal
  web:
    image: nginx:alpine
    container_name: kcal-web
    restart: unless-stopped
    tty: true
    working_dir: /app
    ports:
      - '${APP_PORT:-80}:80'
      - '${APP_PORT_SSL:-443}:443'
    volumes:
      - 'app-public:/app/public/'
      - './etc/nginx/conf.d/:/etc/nginx/conf.d/'
    networks:
      - kcal
    depends_on:
      - app
  elasticsearch:
    image: 'elasticsearch:7.12.0'
    container_name: kcal-elasticsearch
    environment:
      - xpack.security.enabled=false
      - discovery.type=single-node
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    cap_add:
      - IPC_LOCK
    volumes:
      - 'elasticsearch-data:/usr/share/elasticsearch/data'
    ports:
      - '${ELASTIC_PORT:-9200}:9200'
    networks:
      - kcal
  redis:
    image: 'redis:alpine'
    container_name: kcal-redis
    ports:
      - '${REDIS_PORT:-6379}:6379'
    volumes:
      - 'redis-data:/data'
    networks:
      - kcal
networks:
  kcal:
    driver: bridge
volumes:
  app-public:
    driver: local
  elasticsearch-data:
    driver: local
  redis-data:
    driver: local

.env

APP_NAME=kcal
APP_ENV=production
APP_KEY=base64:yt3i8qNUBnsRK0jDLnJ5qMZ+37jPzYfWSPgwrHpnScA=
APP_DEBUG=false
APP_URL=http://10.0.0.11/
APP_PORT=1150
APP_PORT_SSL=1151
APP_TIMEZONE=UTC
DB_CONNECTION=mysql
DB_HOST=10.0.0.11
DB_PORT=3306
DB_DATABASE=app_kcal
DB_USERNAME=app_kcal
DB_PASSWORD=bxGNmGkkuzVA9
REDIS_HOST=redis
REDIS_PORT=1153
SCOUT_DRIVER=elastic
ELASTIC_HOST=elasticsearch:1152
ELASTIC_PORT=1152
MEDIA_DISK=media
QUEUE_CONVERSIONS_BY_DEFAULT=false
BROADCAST_DRIVER=redis
CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
SESSION_LIFETIME=120

Could you help me understand what I'm doing wrong, please?

Thanks!

cdubz commented 2 years ago

@zkvvoob are you attempting to open the SSL or non-SSL port when you get the "unable to connect" error? I'm able to use your config and access the web interface (without the APP_URL=http://10.0.0.11/) on the non-SSL port.

zkvvoob commented 2 years ago

@cdubz, thanks for taking the time to look into the issue.

I've tried accessing kcal on both the SSL and non-SSL port, like this: http://10.0.0.11:1150 and both return Unable to connect. As far as I can see, all 4 containers are running fine without any errors in the Portainer logs.

EDIT: The only error that appears is this

image
zkvvoob commented 2 years ago

@cdubz, would you be able to help me figure out what's wrong with my installation, please?

cdubz commented 2 years ago

@zkvvoob I'm afraid I'm not sure what else to try 😞 I'm not particularly strong with Docker and your setup looks correct as far as I can tell. Is Portainer running other things for you? Could something be interfering? Have you tested running kcal locally?

ruapho commented 1 year ago

For reference: It seems a volume path is incorrect for elasticsearch 7.