From 16b910ac2848a59360dab919b629a3a6ba164756 Mon Sep 17 00:00:00 2001 From: Leifur Halldor Asgeirsson Date: Tue, 22 Nov 2022 12:23:50 -0500 Subject: [PATCH] Remove platform from compose file I believe that the workaround introduced in PR #3562 is no longer needed. Using a fresh project created with cookiecutter-django, I was able to run the app with docker compose using the arm64 platform for the django and postgres images, without any database connection issue. I compared the version of libpq on the arm64 image with the one on the amd64 image and they were identical. If the workaround is no longer needed, it is preferable to use arm64 on an M1 mac for better performance. If any core contributers are using an M1 mac, it would be good to test this before merging to ensure that this isn't just a quirk of my machine. If it helps, I'm using Docker Desktop v4.14.1 with Engine v20.10.21 and compose v1.29.2, on macOS 12.6. --- {{cookiecutter.project_slug}}/local.yml | 2 -- {{cookiecutter.project_slug}}/production.yml | 1 - 2 files changed, 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/local.yml b/{{cookiecutter.project_slug}}/local.yml index fb203acd6..33a8db07a 100644 --- a/{{cookiecutter.project_slug}}/local.yml +++ b/{{cookiecutter.project_slug}}/local.yml @@ -11,7 +11,6 @@ services: dockerfile: ./compose/local/django/Dockerfile image: {{ cookiecutter.project_slug }}_local_django container_name: {{ cookiecutter.project_slug }}_local_django - platform: linux/x86_64 depends_on: - postgres {%- if cookiecutter.use_celery == 'y' %} @@ -44,7 +43,6 @@ services: docs: image: {{ cookiecutter.project_slug }}_local_docs container_name: {{ cookiecutter.project_slug }}_local_docs - platform: linux/x86_64 build: context: . dockerfile: ./compose/local/docs/Dockerfile diff --git a/{{cookiecutter.project_slug}}/production.yml b/{{cookiecutter.project_slug}}/production.yml index 4c1d64c20..ea4292a0d 100644 --- a/{{cookiecutter.project_slug}}/production.yml +++ b/{{cookiecutter.project_slug}}/production.yml @@ -11,7 +11,6 @@ services: context: . dockerfile: ./compose/production/django/Dockerfile image: {{ cookiecutter.project_slug }}_production_django - platform: linux/x86_64 depends_on: - postgres - redis