From eac88dcc2a5a294f4fb5a2d412d79fa91af1cd0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Wed, 19 Feb 2025 12:38:35 +0100 Subject: [PATCH] contributing note about mssql on Apple Silicon --- CONTRIBUTING.md | 4 +++- docker-compose.yml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 498534f7c..7d256f427 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,10 +24,12 @@ To fix this, simply delete the database memory by shutting down containers and s Same thing for `SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared`. -### Docker on M1 +### Docker on Apple Silicon Run `composer docker-m1` to symlink `docker-compose-m1.override.yml` to `docker-compose.override.yml`. This will reconfigure a few services in the docker compose config to be compatible with M1. +2025 note: By now only MSSQL doesn't have good M1 support. The override also started being a bit problematic, having issues with starts, often requiring multiple starts. This often makes the original image in docker-compose more stable, even if it's amd64-only. With Rosetta enabled, you should be able to use it without issues. + ### Coverage reports To run tests and generate coverage reports, use `composer test-full`. diff --git a/docker-compose.yml b/docker-compose.yml index d57e508b0..9d5eb6c8a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -72,12 +72,12 @@ services: tmpfs: - /var/lib/postgresql/data mssql: - image: mcr.microsoft.com/mssql/server:2019-latest + image: mcr.microsoft.com/mssql/server:2022-latest environment: - ACCEPT_EULA=Y - SA_PASSWORD=P@ssword # todo reuse env from above healthcheck: # https://github.com/Microsoft/mssql-docker/issues/133#issuecomment-1995615432 - test: timeout 1 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/1433' + test: timeout 2 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/1433' interval: 10s timeout: 10s retries: 10