zhaowq 1 год назад
Родитель
Сommit
0eae6c0d7e
2 измененных файлов с 19 добавлено и 16 удалено
  1. 5 1
      .gitignore
  2. 14 15
      docker-compose/linux/docker-compose.yml

+ 5 - 1
.gitignore

@@ -19,4 +19,8 @@
 /template/uni-app/node_modules/
 /template/uni-app/unpackage/
 /template/uni-app/.hbuilderx/
-/crmeb/.idea/
+/crmeb/.idea/
+/docker-compose/MacArm/mysql/data/
+/docker-compose/MacArm/mysql/log/
+/docker-compose/linux/mysql/data/
+/docker-compose/linux/mysql/log/

+ 14 - 15
docker-compose/linux/docker-compose.yml

@@ -4,24 +4,24 @@ services:
   mysql:
     container_name: crmeb_mysql #指定容器名
     image: mysql:5.7 #一般电脑可以用这个镜像
+    platform: linux/x86_64
     ports:
       - 3336:3306
     # 环境变量
     environment:
       TZ: Asia/Shanghai
-      MYSQL_ROOT_PASSWORD: '123456'
-      MYSQL_USER: 'crmeb'
-      MYSQL_PASS: '123456'
-      MYSQL_DATABASE: 'crmeb'
+      MYSQL_ROOT_PASSWORD: "123456"
+      MYSQL_USER: "crmeb"
+      MYSQL_PASS: "123456"
+      MYSQL_DATABASE: "crmeb"
     privileged: true
-    command:
-       --character-set-server=utf8mb4
-       --collation-server=utf8mb4_general_ci
-       --explicit_defaults_for_timestamp=true
-       --lower_case_table_names=1
-       --max_allowed_packet=128M
-       --default-authentication-plugin=mysql_native_password
-       --sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
+    command: --character-set-server=utf8mb4
+      --collation-server=utf8mb4_general_ci
+      --explicit_defaults_for_timestamp=true
+      --lower_case_table_names=1
+      --max_allowed_packet=128M
+      --default-authentication-plugin=mysql_native_password
+      --sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
     working_dir: /var/lib/mysql
     volumes:
       - ./mysql/my.cnf:/etc/mysql/my.cnf
@@ -34,7 +34,7 @@ services:
   # redis 容器
   redis:
     container_name: crmeb_redis
-    image: 'redis:alpine'
+    image: "redis:alpine"
     # image: daocloud.io/library/redis:6.0.5-alpine
     # image: redis:5.0
     ports:
@@ -71,11 +71,10 @@ services:
     networks:
       app_net:
         ipv4_address: 192.168.10.90
-#    command: /bin/bash -c "php -v"
   # nginx 容器
   nginx:
     container_name: crmeb_nginx
-    image: 'nginx:alpine'
+    image: "nginx:alpine"
     # image: daocloud.io/library/nginx:1.19.1-alpine
     restart: always
     ports: