litespeedtech / ols-docker-env

OpenLiteSpeed Docker Environment
MIT License
199 stars 132 forks source link

Please add ARM support #51

Closed ceeim closed 1 year ago

ceeim commented 1 year ago

Multiple servers are arm64, I hope they can support it.

timnolte commented 1 year ago

@CeeIM if you pull this repository and switch out the litespeedtech image for my arm64 image (https://hub.docker.com/r/ndigitals/openlitespeed) this should work until LiteSpeedTech publishes an official arm64 image. They have been in contact with me on their Slack but there are a lot of items that they need to complete before they can release their own official arm64 image based on how they are currently building their Docker images.

ceeim commented 1 year ago

@timnolte Thank you for the ARM image, I will try it.

Code-Egg commented 1 year ago

Please check https://docs.litespeedtech.com/cloud/docker/openlitespeed/#download-an-image, close the issue

andygrillo commented 1 year ago

When replacing the litespeed image to (https://hub.docker.com/r/ndigitals/openlitespeed) , everything compiles except the phpmyadmin (no problem, not needed for me).

However I am unable to make new virtual hosts. When I run 'bash bin/demosite.sh', I get this error:

ubuntu@ip-172-31-25-95:~/ols-docker-env$ bash bin/demosite.sh
[O] The root folder ./sites/localhost/ exist.
Database wordpress already exist, skip DB creation!
Storing database parameter
bin/demosite.sh: line 65: ./sites/localhost//.db_pass: Permission denied
Set owner to 1000
/usr/local/bin/appinstallctl.sh: line 600: wp: command not found
db pass file can not locate, skip wp-config pre-config.
Skip!

In the docker logs I see this:

[Warning] Aborted connection 3 to db: 'unconnected' user: 'unauthenticated' host: '172.18.0.3' (This connection closed normally without authentication)

suggesting that Mariadb can't accept the WP connection ?

andygrillo commented 1 year ago

FYI, this is the docker compose I use:

version: '3'
services:
  mysql:
    image: mariadb:latest
    logging:
      driver: none
    command: --max_allowed_packet=256M
    volumes:
      - "./data/db:/var/lib/mysql:delegated"
    environment:
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
      MYSQL_DATABASE: ${MYSQL_DATABASE}
      MYSQL_USER: ${MYSQL_USER}
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
    restart: always
    networks:
      - default
  litespeed:
    image: ghcr.io/ndigitals/openlitespeed:latest
    logging:
      driver: none
    env_file:
      - .env
    volumes:
      - ./lsws/conf:/usr/local/lsws/conf
      - ./lsws/admin-conf:/usr/local/lsws/admin/conf
      - ./bin/container:/usr/local/bin
      - ./sites:/var/www/vhosts/
      - ./acme:/root/.acme.sh/
      - ./logs:/usr/local/lsws/logs/
    ports:
      - 80:80
      - 443:443
      - 443:443/udp
      - 7080:7080
    restart: always
    environment:
      TZ: ${TimeZone}
    networks:
      - default
networks:
  default:
timnolte commented 1 year ago

@andygrillo that Docker image isn't valid anymore. You need to use the image that is now in the GitHub Registry. https://github.com/ndigitals/ols-dockerfiles/pkgs/container/openlitespeed

timnolte commented 1 year ago

@andygrillo oh, looks like your Docker Compose file is using the correct image.

timnolte commented 1 year ago

@andygrillo dis you fix your directory permissions as the error indicated, and restart your environment?

bin/demosite.sh: line 65: ./sites/localhost//.db_pass: Permission denied Set owner to 1000