From a44f00310490aa20c128e15ea7c9185e43898e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 10:11:35 +0200 Subject: [PATCH 1/2] Add Docker Compose override for Apple M1 --- docker-compose.apple-m1.override.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docker-compose.apple-m1.override.yml diff --git a/docker-compose.apple-m1.override.yml b/docker-compose.apple-m1.override.yml new file mode 100644 index 0000000..80344e4 --- /dev/null +++ b/docker-compose.apple-m1.override.yml @@ -0,0 +1,36 @@ +# This docker-compose file is just here for testing + +version: "3.4" + +services: + + ######################################################## + # WEBAPP ############################################### + ######################################################## + webapp: + platform: linux/amd64 + + ######################################################## + # BACKEND ############################################## + ######################################################## + backend: + platform: linux/amd64 + + ######################################################## + # MAINTENANCE ########################################## + ######################################################## + maintenance: + platform: linux/amd64 + + ######################################################## + # NEO4J ################################################ + ######################################################## + neo4j: + platform: linux/amd64 + + ######################################################## + # MAILSERVER TO FAKE SMTP ############################## + ######################################################## + # commented out, because otherwise override of production would error. and it seems unnecessary + # mailserver: + # platform: linux/amd64 From b36eb508a64363ef7b3a60ad2bd040765cabd7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 10:45:38 +0200 Subject: [PATCH 2/2] Document Docker Compose override for Apple M1 --- docker/DOCKER_MORE_CLOSELY.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docker/DOCKER_MORE_CLOSELY.md diff --git a/docker/DOCKER_MORE_CLOSELY.md b/docker/DOCKER_MORE_CLOSELY.md new file mode 100644 index 0000000..113e3a4 --- /dev/null +++ b/docker/DOCKER_MORE_CLOSELY.md @@ -0,0 +1,33 @@ +# Docker + +## Apple M1 Platform + +***Attention:** For using Docker commands in Apple M1 environments!* + +```bash +# set env variable for your shell +$ export DOCKER_DEFAULT_PLATFORM=linux/amd64 +``` + +For even more informations, see [Docker More Closely](#docker-more-closely) + +### Docker Compose Override File For Apple M1 Platform + +For Docker compose `up` or `build` commands, you can use our Apple M1 override file that specifies the M1 platform: + +```bash +# in main folder + +# for production +$ docker compose -f docker-compose.yml -f docker-compose.apple-m1.override.yml up + +# for production testing Docker images from DockerHub +$ docker compose -f docker-compose.ocelotsocial-branded.yml -f docker-compose.apple-m1.override.yml up + +# only once: init admin user and create indexes and contraints in Neo4j database +$ docker compose exec backend /bin/sh -c "yarn prod:migrate init" +``` + +## Docker More Closely In Main Code + +To get more informations about the Apple M1 platform and to analyze the Docker builds etc. you find our documentation in our main code, [here](https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/DOCKER_MORE_CLOSELY.md).