diff --git a/code/app/base-expo-app/app.json b/code/app/base-expo-app/app.json index 05b3248d..aae4a730 100644 --- a/code/app/base-expo-app/app.json +++ b/code/app/base-expo-app/app.json @@ -21,10 +21,17 @@ "backgroundColor": "#ffffff" }, "edgeToEdgeEnabled": true, - "predictiveBackGestureEnabled": false + "predictiveBackGestureEnabled": false, + "package": "com.oneao.baseexpoapp" }, "web": { "favicon": "./assets/favicon.png" - } + }, + "extra": { + "eas": { + "projectId": "71ff7e2e-4fa3-46e0-b3ed-d8117eacb888" + } + }, + "owner": "oneao" } } diff --git a/code/app/base-expo-app/dockerfile.build b/code/app/base-expo-app/dockerfile.build index 1686ed47..aca15f76 100644 --- a/code/app/base-expo-app/dockerfile.build +++ b/code/app/base-expo-app/dockerfile.build @@ -1,13 +1,7 @@ FROM mobiledevops/android-sdk-image:latest -# 更新系统并安装 Node/npm RUN apt update \ && apt install -y nodejs npm - -# 👉 设置 npm 镜像源(推荐使用官方 npmmirror) -RUN npm config set registry https://registry.npmmirror.com - -# 全局工具安装 RUN npm i -g eas-cli expo yarn COPY ./ /WWW/APP @@ -16,7 +10,5 @@ WORKDIR /WWW/APP ENV EXPO_TOKEN=FFb6cn9saprFaYji0JVywV0RiNIB7t-PpUKO3jKQ ENV NODE_ENV=production -# 项目依赖安装(使用上面配置的镜像源) RUN npm i - CMD eas build --platform android --profile release --local diff --git a/code/app/base-expo-app/package.json b/code/app/base-expo-app/package.json index 0912150c..78af4f38 100644 --- a/code/app/base-expo-app/package.json +++ b/code/app/base-expo-app/package.json @@ -4,8 +4,8 @@ "main": "index.ts", "scripts": { "start": "expo start", - "android": "expo start --android", - "ios": "expo start --ios", + "android": "expo run:android", + "ios": "expo run:ios", "web": "expo start --web" }, "dependencies": { diff --git a/notes/前端开发/react-native/expo.md b/notes/前端开发/react-native/expo.md new file mode 100644 index 00000000..5c6d0531 --- /dev/null +++ b/notes/前端开发/react-native/expo.md @@ -0,0 +1,53 @@ +官网:https://expo.dev/ + +# 初始化项目 + + + + + +# 打包 + +## 云打包 + +1. 安装 EAS CLI + +```bash +npm install -g eas-cli +``` + +2. 注册并登录 Expo 账户 + +访问 https://expo.dev/ 注册账户,然后命令行登录: + +```bash +expo login +``` + +3. 配置项目构建 + +```bash +eas build:configure +``` + +选择 Android 平台即可。 + +4. 构建 Android 包 + +默认构建 AAB 包(上传 Google Play): + +```bash +eas build --platform android +``` + +构建 APK(可直接安装): + +```bash +eas build -p android --profile preview +``` + +## 本地打包 + +### EAS方式 + +### 原生方式 \ No newline at end of file diff --git a/notes/后端开发/docker/docker.md b/notes/后端开发/docker/docker.md index 2c9bd740..44591c51 100644 --- a/notes/后端开发/docker/docker.md +++ b/notes/后端开发/docker/docker.md @@ -1,4 +1,16 @@ -## docker 和 docker compose安装 +# 安装 + +## 快速安装 + +执行命令,按照步骤操作即可 + +```bash +bash <(wget -qO- https://xuanyuan.cloud/docker.sh) +``` + + + +## 脚本安装 ### 脚本命令 @@ -235,7 +247,47 @@ echo "Docker 及 Docker Compose 安装完成 ✅" -### 权限不足 +## 镜像设置 + +访问:https://api.suoyinmulu.com/open/v1/docker-hub/seeded-up/lists + +```bash +sudo vim /etc/docker/daemon.json +``` + +刷新: + +```bash +sudo systemctl daemon-reload && sudo systemctl restart docker +``` + +```bash +{ + "registry-mirrors": [ + "https://docker.1panel.live/", + "https://docker.1ms.run", + "https://docker.xpg666.xyz/", + "https://docker.xuanyuan.me", + "https://dytt.online", + "https://lispy.org", + "https://docker-0.unsee.tech", + "https://666860.xyz", + "https://hub.rat.dev", + "https://docker.m.daocloud.io", + "https://dockerproxy.net", + "https://proxy.vvvv.ee", + "https://registry.cyou", + "https://hub.rat.dev", + "https://atomhub.openatom.cn" + ] +} +``` + + + +# 遇到的问题 + +## 权限不足 1. 添加docker用户组(默认有) @@ -263,16 +315,3 @@ sudo chown root:docker /var/run/docker.sock -### 镜像设置 - -访问:https://api.suoyinmulu.com/open/v1/docker-hub/seeded-up/lists - -```bash -sudo vim /etc/docker/daemon.json -``` - -刷新: -```bash -sudo systemctl daemon-reload && sudo systemctl restart docker -``` -