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 build on raspberry pi #36

Open
kdheepak opened this issue Oct 31, 2021 · 2 comments
Open

Unable to build on raspberry pi #36

kdheepak opened this issue Oct 31, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kdheepak
Copy link

Hi, thanks for making this service. I'm looking forward to using it. Has anyone built this on a raspberry pi? I'm unable to get it to work. The app container keeps crashes immediately after boot. I'm assuming it has something to do with the binary that's being run not being arm compatible.

I also had other issues getting redis, elasticsearch and mysql running on the raspberry pi, but I've been able to slowly work through them by using various different images. Here is the docker compose file that I'm currently using:

  kcal-app:
    image: kcalapp/kcal
    container_name: kcal-app
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    tty: true
    working_dir: /app
    env_file: ./kcal/.env
    volumes:
      - './kcal/app/public:/app/public/'
      - './kcal/etc/php/php.ini:/usr/local/etc/php/conf.d/local.ini'
    networks:
      - net
    depends_on:
      - kcal-db

  kcal-db:
    image: hypriot/rpi-mysql
    container_name: kcal-db
    restart: unless-stopped
    tty: true
    privileged: true
    security_opt:
      - no-new-privileges:true
    ports:
      - '${DB_PORT:-3306}:3306'
    environment:
      MYSQL_ROOT_PASSWORD: '${DB_PASSWORD:-kcal}'
      MYSQL_DATABASE: '${DB_DATABASE:-kcal}'
      MYSQL_USER: '${DB_USERNAME:-kcal}'
      MYSQL_PASSWORD: '${DB_PASSWORD:-kcal}'
      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
    volumes:
      - './kcal/db/data:/var/lib/mysql/'
      - './kcal/etc/mysql/my.cnf:/etc/mysql/my.cnf'
    networks:
      - net

  kcal-web:
    image: nginx:alpine
    container_name: kcal-web
    security_opt:
      - no-new-privileges:true
    restart: unless-stopped
    tty: true
    working_dir: /app
    volumes:
      - './kcal/app/public:/app/public/'
      - './kcal/etc/nginx/conf.d/:/etc/nginx/conf.d/'
    networks:
      - net
    depends_on:
      - kcal-app
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.kcal-web.rule=Host(`kcal.$DOMAIN`)"
      - "traefik.http.routers.kcal-web.entrypoints=https"

  kcal-elasticsearch:
    image: 'ind3x/rpi-elasticsearch'
    container_name: kcal-elasticsearch
    security_opt:
      - no-new-privileges:true
    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:
      - './kcal/elasticsearch/data:/usr/share/elasticsearch/data'
    ports:
      - '${ELASTIC_PORT:-9200}:9200'
    networks:
      - net

  kcal-redis:
    image: 'redis:latest'
    container_name: kcal-redis
    privileged: true
    security_opt:
      - no-new-privileges:true
    ports:
      - '${REDIS_PORT:-6379}:6379'
    volumes:
      - './kcal/redis/data:/data'
    networks:
      - net

I also tried cloning the kcal repo and building an image using the Dockerfile, but changing the php image, but I had no luck. The Dockerfile uses apk, so I had to use the alpine image specified in the file, however I ran into various issues with that while building.

@cdubz
Copy link
Member

cdubz commented Oct 31, 2021

I’ll give this a try on one of my pis to see if I can get it to work. Docker architectures always confuse me.

@cdubz cdubz added enhancement New feature or request help wanted Extra attention is needed labels Oct 31, 2021
@kdheepak
Copy link
Author

I'm happy to help too, although I'm fairly new to Docker too. I have a couple of pis that I can test on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants