ThreeDotsLabs / wild-workouts-go-ddd-example

Go DDD example application. Complete project to show how to apply DDD, Clean Architecture, and CQRS by practical refactoring.
https://threedots.tech
MIT License
5.04k stars 464 forks source link

M1 mac support #44

Closed adamlounds closed 2 years ago

adamlounds commented 2 years ago

Attempted to run the example on m1 mac today, but hit a few issues.

I'll document the changes I made so docker-compose up at least runs. The web page won't allow logins, but it's a start :)

Issue: mysql has no arm64/v8 docker image solution: use MariaDB

diff --git a/docker-compose.yml b/docker-compose.yml
index cb19149..20485db 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -107,7 +107,7 @@ services:
     restart: unless-stopped

   mysql:
-    image: mysql:8
+    image: mariadb:10.5.8
     env_file:
       - .env
     volumes:

Issue: npm install fails to compile node-sass, sass-loader doesn't like new webpack etc Solution: Remove old web/package-lock.json, apply these patches to use newer node, update vue etc.

diff --git a/web/package.json b/web/package.json
index 5e2d250..fce85fa 100644
--- a/docker/web/Dockerfile
+++ b/docker/web/Dockerfile
@@ -1,4 +1,4 @@
-FROM node:13.11.0-alpine3.11
+FROM node:lts-alpine

 ENV NODE_ENV development
diff --git a/web/package.json b/web/package.json
index 4f686c9..eef1feb 100644
--- a/web/package.json
+++ b/web/package.json
@@ -20,23 +20,25 @@
     "firebase-auth": "^0.1.2",
     "jquery": "^3.4.1",
     "jsonwebtoken": "^8.5.1",
-    "node-sass": "^4.13.1",
     "popper.js": "^1.16.1",
-    "sass-loader": "^8.0.2",
     "superagent": "^5.2.2",
-    "vue": "^2.6.11",
+    "vue": "^2.6.14",
     "vue-router": "^3.1.6",
     "vue-toast-notification": "^0.2.0",
-    "vuejs-dialog": "^1.4.1"
+    "vuejs-dialog": "^1.4.1",
+    "yarn": "^1.22.17"
   },
   "devDependencies": {
-    "@vue/cli-plugin-babel": "~4.2.0",
-    "@vue/cli-plugin-eslint": "~4.2.0",
-    "@vue/cli-service": "~4.2.0",
+    "@vue/cli-plugin-babel": "^4.5.15",
+    "@vue/cli-plugin-eslint": "^4.5.15",
+    "@vue/cli-service": "^4.5.15",
     "babel-eslint": "^10.0.3",
     "eslint": "^6.7.2",
     "eslint-plugin-vue": "^6.1.2",
-    "vue-template-compiler": "^2.6.11"
+    "sass": "^1.43.4",
+    "sass-loader": "^10.1.1",
+    "vue-template-compiler": "^2.6.14",
+    "webpack": "^5.64.0"
   },
   "eslintConfig": {
     "root": true,
adamlounds commented 2 years ago

Update: login issue was caused by safari's somewhat over-zealous cross-site tracking prevention. As a workaround: preferences, privacy, uncheck "Prevent cross-site tracking" Unfortunately this does not fix all issues, even under chrome it's having cross-site issues.

m110 commented 2 years ago

Thanks @adamlounds, I'll look into this. 👍

roblaszczak commented 2 years ago

@adamlounds should be fixed by that PR https://github.com/ThreeDotsLabs/wild-workouts-go-ddd-example/pull/54 ! 😎