qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

Docker configuration needs changes to work on Mac (M1+)

Open cellio opened this issue 5 months ago • 2 comments

I tried to set up QPixel with Docker on a Mac M1 with MacOS 14.2.1 (Sonoma) and ran into many issues. With help we got it working; this issue is to track changes for both the Docker setup and our installation doc to make it easier for the next person. I was working with (and leaning heavily on) @Oaphi , who will probably have more to add to this list.

  • We had to edit Dockerfile to be more explicit about architecture, replacing # FROM ruby:3.0.0 with FROM --platform=linux/arm64 ruby:3.0.0. Dockerfile has to work for everyone so we can't edit it in the repo, but we should document this requirement in the readme file.
  • Similarly, in docker-compose.yml, in the uwsgi block, we had to add platform: linux/amd64. Again, we should document this.
  • We had to edit manifest.js to add: //= link application.css. I don't understand the failure that led to this so I don't know if this is specific to this platform, a more general problem, or a gremlin. Needs more review.
  • We had issues with mysql setup, but I don't know if they were general bugs or problems with interference from the host system. We had to drop and recreate the root@% and qpixel@% users, give root the ability to do grants, and then do the qpixel grants manually. Needs more review (or testing, if we can get a clean Mac environment to test on).
  • In the uwsgi container, we had to do dpkg --add-architecture amd64 and then manually install libc6:amd64 and g++-multilib. I think the configuration should be able to do that for us, but if not and we need to document this, the cycle is: apt install..., rake tmp:clear, rm -rf ./public/assets, rm -rf ./tmp/cache/assets, rails assets:precompile, rails restart.

cellio avatar Sep 09 '24 20:09 cellio