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.
This commit is contained in:
Leifur Halldor Asgeirsson 2022-11-22 12:23:50 -05:00
parent c59e3b337f
commit 16b910ac28
2 changed files with 0 additions and 3 deletions

View File

@ -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

View File

@ -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