Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect after installing with docker-compose #1

Open
zkvvoob opened this issue Aug 9, 2022 · 5 comments
Open

Unable to connect after installing with docker-compose #1

zkvvoob opened this issue Aug 9, 2022 · 5 comments

Comments

@zkvvoob
Copy link

zkvvoob commented Aug 9, 2022

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
Copy link
Member

cdubz commented Aug 11, 2022

@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
Copy link
Author

zkvvoob commented Aug 12, 2022

@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
Copy link
Author

zkvvoob commented Aug 26, 2022

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

@cdubz
Copy link
Member

cdubz commented Aug 26, 2022

@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
Copy link

ruapho commented Aug 18, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants