我试图在一台机器上创建多个Prisma数据库服务.我无法使用Docker Compose在3306以外的端口上创建MySQL数据库.
泊坞窗,compose.yml
version: '3'
services:
hackernews:
image: prismagraphql/prisma:1.8
restart: always
ports:
- "${CLIENT_PORT}:${INTERNAL_PORT}"
environment:
PRISMA_CONFIG: |
port: $INTERNAL_PORT
managementApiSecret: $PRISMA_MANAGEMENT_API_SECRET
databases:
default:
connector: mysql
host: mysql
port: $SQL_INTERNAL_PORT
user: root
password: $SQL_PASSWORD
migrations: true
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: $SQL_PASSWORD
volumes:
- ./custom/:/etc/mysql/conf.d/my.cnf
- mysql:/var/lib/mysql
volumes:
mysql:
Run Code Online (Sandbox Code Playgroud)
泊坞窗,compose.override.yml
version: '3'
services:
mysql:
expose:
- "${SQL_INTERNAL_PORT}"
ports:
- "${SQL_CLIENT_PORT}:${SQL_INTERNAL_PORT}"
Run Code Online (Sandbox Code Playgroud)
错误:
hackernews_1 | Exception in thread "main" java.sql.SQLTransientConnectionException: database - Connection is not available, request timed out after 5008ms. …Run Code Online (Sandbox Code Playgroud) 在我的 React Native 应用程序(在构建的 APK 上)中调用 Expo.Google.logInAsync() 后,我收到错误代码 400“redirect_uri_mismatch”。请注意,在 Expo 客户端上,我没有收到错误消息,Google 登录页面崩溃没有错误。我怀疑错误被记录在本地某处。
我正在使用 Expo 版本 32.0.0 和 React Native 版本 32.0.0。
我已按照此处列出的说明进行操作https://docs.expo.io/versions/v32.0.0/sdk/google/并创建了 iOS 和 Android OAuth 客户端 ID。
下面是我的代码的副本:
const signInWithGoogleAsync = async () => {
try {
const result = await Expo.Google.logInAsync({
androidClientId: ANDROID_CLIENT_ID,
iosClientId: IOS_CLIENT_ID,
scopes: ['profile', 'email'],
});
if (result.type === 'success') {
return result.accessToken;
} else {
return {cancelled: true};
}
} catch(e) {
console.log(e);
}
}
Run Code Online (Sandbox Code Playgroud)
对你的帮助表示感谢。
如果您需要其他信息,请告诉我。
谢谢你。