Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: is docker (#14209)

Danny Xu9b4902fcba08
diff --git a/backend/api/v1/actuator_service.go b/backend/api/v1/actuator_service.go
index c10bf2c2d7..5ff96b05e5 100644
--- a/backend/api/v1/actuator_service.go
+++ b/backend/api/v1/actuator_service.go
@@ -131,6 +131,7 @@ func (s *ActuatorService) getServerInfo(ctx context.Context) (*v1pb.ActuatorInfo
WorkspaceId: workspaceID,
GitopsWebhookUrl: setting.GitopsWebhookUrl,
Debug: s.profile.RuntimeDebug.Load(),
+ Docker: s.profile.IsDocker,
Lsp: s.profile.Lsp,
PreUpdateBackup: true,
UnlicensedFeatures: unlicensedFeaturesString,
diff --git a/backend/bin/server/cmd/profile.go b/backend/bin/server/cmd/profile.go
index 0494fc4327..ad99f2ed49 100644
--- a/backend/bin/server/cmd/profile.go
+++ b/backend/bin/server/cmd/profile.go
@@ -1,6 +1,7 @@
package cmd
import (
+ "os"
"time"
"github.com/google/uuid"
@@ -24,6 +25,7 @@ func getBaseProfile(dataDir string) *config.Profile {
Readonly: flags.readonly,
SaaS: flags.saas,
Debug: flags.debug,
+ IsDocker: isDocker(),
DataDir: dataDir,
ResourceDir: common.GetResourceDir(dataDir),
DemoName: flags.demoName,
@@ -36,3 +38,10 @@ func getBaseProfile(dataDir string) *config.Profile {
DevelopmentVersioned: flags.developmentVersioned,
}
}
+
+func isDocker() bool {
+ if _, err := os.Stat("/etc/bb.env"); err == nil {
+ return true
+ }
+ return false
+}
diff --git a/backend/component/config/profile.go b/backend/component/config/profile.go
index f8e1fec279..48789f977a 100644
--- a/backend/component/config/profile.go
+++ b/backend/component/config/profile.go
@@ -34,6 +34,8 @@ type Profile struct {
Readonly bool
// When we are running in SaaS mode, some features are not allowed to edit by users.
SaaS bool
+ // Whether the server is running in a docker container.
+ IsDocker bool
// Debug is the startup time debug
Debug bool
// DataDir is the directory stores the data including Bytebase's own database, backups, etc.
diff --git a/frontend/src/components/InstanceForm/InstanceForm.vue b/frontend/src/components/InstanceForm/InstanceForm.vue
index c893de5243..d001ac21de 100644
--- a/frontend/src/components/InstanceForm/InstanceForm.vue
+++ b/frontend/src/components/InstanceForm/InstanceForm.vue
@@ -13,10 +13,9 @@
<script lang="ts" setup>
import { watch, onMounted, toRef } from "vue";
import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";
-import { useSettingV1Store } from "@/store";
+import { useActuatorV1Store, useSettingV1Store } from "@/store";
import { Engine } from "@/types/proto/v1/common";
import { Instance } from "@/types/proto/v1/instance_service";
-import { isDev } from "@/utils";
import { FeatureModal } from "../FeatureGuard";
import { defaultPortForEngine } from "./constants";
import { provideInstanceFormContext } from "./context";
@@ -31,6 +30,7 @@ const emit = defineEmits<{
}>();
const settingV1Store = useSettingV1Store();
+const actuatorStore = useActuatorV1Store();
const instance = toRef(props, "instance");
const hideAdvancedFeatures = toRef(props, "hideAdvancedFeatures");
@@ -39,7 +39,7 @@ const { events, isCreating, basicInfo, adminDataSource, missingFeature } =
context;
onMounted(async () => {
if (isCreating.value) {
- adminDataSource.value.host = isDev() ? "127.0.0.1" : "host.docker.internal";
+ adminDataSource.value.host = actuatorStore.isDocker ? "host.docker.internal" : "127.0.0.1";
if (basicInfo.value.engine === Engine.DYNAMODB) {
adminDataSource.value.host = "";
}
diff --git a/frontend/src/store/modules/v1/actuator.ts b/frontend/src/store/modules/v1/actuator.ts
index 351fa048b2..c79fb584dd 100644
--- a/frontend/src/store/modules/v1/actuator.ts
+++ b/frontend/src/store/modules/v1/actuator.ts
@@ -69,6 +69,9 @@ export const useActuatorV1Store = defineStore("actuator_v1", {
isDebug: (state) => {
return state.serverInfo?.debug || false;
},
+ isDocker: (state) => {
+ return state.serverInfo?.docker || false;
+ },
isSaaSMode: (state) => {
return state.serverInfo?.saas || false;
},
diff --git a/frontend/src/types/proto/v1/actuator_service.ts b/frontend/src/types/proto/v1/actuator_service.ts
index 7b029556af..4a060c0a08 100644
--- a/frontend/src/types/proto/v1/actuator_service.ts
+++ b/frontend/src/types/proto/v1/actuator_service.ts
@@ -85,7 +85,11 @@ export interface ActuatorInfo {
unlicensedFeatures: string[];
/** disallow_password_signin is the flag to disallow user signin with email&password. (except workspace admins) */
disallowPasswordSignin: boolean;
- passwordRestriction: PasswordRestrictionSetting | undefined;
+ passwordRestriction:
+ | PasswordRestrictionSetting
+ | undefined;
+ /** docker flag means if the Bytebase instance is running in docker. */
+ docker: boolean;
}
function createBaseGetResourcePackageRequest(): GetResourcePackageRequest {
@@ -373,6 +377,7 @@ function createBaseActuatorInfo(): ActuatorInfo {
unlicensedFeatures: [],
disallowPasswordSignin: false,
passwordRestriction: undefined,
+ docker: false,
};
}
@@ -441,6 +446,9 @@ export const ActuatorInfo: MessageFns<ActuatorInfo> = {
if (message.passwordRestriction !== undefined) {
PasswordRestrictionSetting.encode(message.passwordRestriction, writer.uint32(170).fork()).join();
}
+ if (message.docker !== false) {
+ writer.uint32(176).bool(message.docker);
+ }
return writer;
},
@@ -598,6 +606,13 @@ export const ActuatorInfo: MessageFns<ActuatorInfo> = {
message.passwordRestriction = PasswordRestrictionSetting.decode(reader, reader.uint32());
continue;
+ case 22:
+ if (tag !== 176) {
+ break;
+ }
+
+ message.docker = reader.bool();
+ continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -636,6 +651,7 @@ export const ActuatorInfo: MessageFns<ActuatorInfo> = {
passwordRestriction: isSet(object.passwordRestriction)
? PasswordRestrictionSetting.fromJSON(object.passwordRestriction)
: undefined,
+ docker: isSet(object.docker) ? globalThis.Boolean(object.docker) : false,
};
},
@@ -704,6 +720,9 @@ export const ActuatorInfo: MessageFns<ActuatorInfo> = {
if (message.passwordRestriction !== undefined) {
obj.passwordRestriction = PasswordRestrictionSetting.toJSON(message.passwordRestriction);
}
+ if (message.docker !== false) {
+ obj.docker = message.docker;
+ }
return obj;
},
@@ -737,6 +756,7 @@ export const ActuatorInfo: MessageFns<ActuatorInfo> = {
message.passwordRestriction = (object.passwordRestriction !== undefined && object.passwordRestriction !== null)
? PasswordRestrictionSetting.fromPartial(object.passwordRestriction)
: undefined;
+ message.docker = object.docker ?? false;
return message;
},
};
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 9c38169325..8c3737f1e8 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -8463,6 +8463,9 @@ components:
description: disallow_password_signin is the flag to disallow user signin with email&password. (except workspace admins)
passwordRestriction:
$ref: '#/components/schemas/PasswordRestrictionSetting'
+ docker:
+ type: boolean
+ description: docker flag means if the Bytebase instance is running in docker.
description: |-
ServerInfo is the API message for server info.
Actuator concept is similar to the Spring Boot Actuator.
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 582f53b858..57d02ee375 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -5204,6 +5204,7 @@ Actuator concept is similar to the Spring Boot Actuator.
| unlicensed_features | [string](#string) | repeated | |
| disallow_password_signin | [bool](#bool) | | disallow_password_signin is the flag to disallow user signin with email&amp;password. (except workspace admins) |
| password_restriction | [PasswordRestrictionSetting](#bytebase-v1-PasswordRestrictionSetting) | | |
+| docker | [bool](#bool) | | docker flag means if the Bytebase instance is running in docker. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index c53d4a2832..f693e94595 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -15103,6 +15103,13 @@ Default to this mode.</p></td>
<td><p> </p></td>
</tr>
+ <tr>
+ <td>docker</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>docker flag means if the Bytebase instance is running in docker. </p></td>
+ </tr>
+
</tbody>
</table>
diff --git a/proto/generated-go/v1/actuator_service.pb.go b/proto/generated-go/v1/actuator_service.pb.go
index 6f2f7430e5..37c36c4484 100644
--- a/proto/generated-go/v1/actuator_service.pb.go
+++ b/proto/generated-go/v1/actuator_service.pb.go
@@ -282,6 +282,8 @@ type ActuatorInfo struct {
// disallow_password_signin is the flag to disallow user signin with email&password. (except workspace admins)
DisallowPasswordSignin bool `protobuf:"varint,20,opt,name=disallow_password_signin,json=disallowPasswordSignin,proto3" json:"disallow_password_signin,omitempty"`
PasswordRestriction *PasswordRestrictionSetting `protobuf:"bytes,21,opt,name=password_restriction,json=passwordRestriction,proto3" json:"password_restriction,omitempty"`
+ // docker flag means if the Bytebase instance is running in docker.
+ Docker bool `protobuf:"varint,22,opt,name=docker,proto3" json:"docker,omitempty"`
}
func (x *ActuatorInfo) Reset() {
@@ -461,6 +463,13 @@ func (x *ActuatorInfo) GetPasswordRestriction() *PasswordRestrictionSetting {
return nil
}
+func (x *ActuatorInfo) GetDocker() bool {
+ if x != nil {
+ return x.Docker
+ }
+ return false
+}
+
var File_v1_actuator_service_proto protoreflect.FileDescriptor
var file_v1_actuator_service_proto_rawDesc = []byte{
@@ -498,7 +507,7 @@ var file_v1_actuator_service_proto_rawDesc = []byte{
0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52,
0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x14, 0x0a, 0x12, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x22, 0xf6, 0x06, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e,
+ 0x74, 0x22, 0x8e, 0x07, 0x0a, 0x0c, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e,
0x66, 0x6f, 0x12, 0x1e, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0a, 0x67, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
@@ -553,43 +562,44 @@ var file_v1_actuator_service_proto_rawDesc = []byte{
0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x77,
0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65,
0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52,
- 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x9f, 0x04, 0x0a, 0x0f, 0x41,
- 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x73,
- 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66,
- 0x6f, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
- 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66,
- 0x6f, 0x22, 0x20, 0xda, 0x41, 0x00, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13,
- 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x69,
- 0x6e, 0x66, 0x6f, 0x12, 0xaa, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63,
- 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74,
- 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41,
- 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
- 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x51, 0xda,
- 0x41, 0x14, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xea, 0x30, 0x0f, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74,
- 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x1d, 0x3a, 0x08, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x32, 0x11, 0x2f,
- 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x66, 0x6f,
- 0x12, 0x66, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12,
- 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65,
- 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1e, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74,
- 0x6f, 0x72, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74,
- 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12,
- 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,
- 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61,
- 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0x25, 0xda, 0x41, 0x00, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74,
- 0x6f, 0x72, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x42, 0x11, 0x5a, 0x0f,
- 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62,
- 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f,
+ 0x63, 0x6b, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x6f, 0x63, 0x6b,
+ 0x65, 0x72, 0x32, 0x9f, 0x04, 0x0a, 0x0f, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74,
+ 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65,
+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x75, 0x61,
+ 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74,
+ 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x20, 0xda, 0x41, 0x00, 0x80, 0xea,
+ 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63,
+ 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0xaa, 0x01, 0x0a, 0x12,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e,
+ 0x66, 0x6f, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x49,
+ 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f,
+ 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x51, 0xda, 0x41, 0x14, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74,
+ 0x6f, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x8a, 0xea,
+ 0x30, 0x0f, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x73, 0x65,
+ 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x08, 0x61, 0x63, 0x74,
+ 0x75, 0x61, 0x74, 0x6f, 0x72, 0x32, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61,
+ 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x66, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x63, 0x68,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x22, 0x1e, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x76,
+ 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65,
+ 0x12, 0x81, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0x25, 0xda,
+ 0x41, 0x00, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x76,
+ 0x31, 0x2f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x73, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
+ 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/proto/v1/actuator_service.proto b/proto/v1/actuator_service.proto
index 5641b33d56..558b285fb0 100644
--- a/proto/v1/actuator_service.proto
+++ b/proto/v1/actuator_service.proto
@@ -126,4 +126,7 @@ message ActuatorInfo {
bool disallow_password_signin = 20;
PasswordRestrictionSetting password_restriction = 21;
+
+ // docker flag means if the Bytebase instance is running in docker.
+ bool docker = 22;
}
diff --git a/scripts/Dockerfile b/scripts/Dockerfile
index 4ae9c425c6..6c1749a973 100644
--- a/scripts/Dockerfile
+++ b/scripts/Dockerfile
@@ -110,6 +110,8 @@ ENV PATH="${PATH}:/var/opt/bytebase/resources/postgres-linux-${TARGETARCH}-16/bi
# - Demo script to launch Bytebase in readonly demo mode
COPY ./scripts /usr/local/bin/
COPY ./scripts/.psqlrc /root/.psqlrc
+# The file indicates running in docker environment.
+RUN touch /etc/bb.env
COPY --from=backend /backend-build/bytebase /usr/local/bin/
COPY --from=backend /etc/ssl/certs /etc/ssl/certs
COPY --from=decompressor /var/opt/bytebase/resources /bytebase/resources
diff --git a/scripts/Dockerfile.aws b/scripts/Dockerfile.aws
index db4b8e55e7..29adc5dddd 100644
--- a/scripts/Dockerfile.aws
+++ b/scripts/Dockerfile.aws
@@ -111,6 +111,8 @@ ENV PATH="${PATH}:/var/opt/bytebase/resources/postgres-linux-${TARGETARCH}-16/bi
# - Demo script to launch Bytebase in readonly demo mode
COPY ./scripts /usr/local/bin/
COPY ./scripts/.psqlrc /root/.psqlrc
+# The file indicates running in docker environment.
+RUN touch /etc/bb.env
COPY --from=backend /backend-build/bytebase /usr/local/bin/
COPY --from=backend /etc/ssl/certs /etc/ssl/certs
COPY --from=decompressor /var/opt/bytebase/resources /bytebase/resources
diff --git a/scripts/Dockerfile.depot b/scripts/Dockerfile.depot
index a8150aeea3..80832b2e45 100644
--- a/scripts/Dockerfile.depot
+++ b/scripts/Dockerfile.depot
@@ -85,6 +85,8 @@ ENV PATH="${PATH}:/var/opt/bytebase/resources/postgres-linux-${TARGETARCH}-16/bi
# - Demo script to launch Bytebase in readonly demo mode
COPY ./scripts /usr/local/bin/
COPY ./scripts/.psqlrc /root/.psqlrc
+# The file indicates running in docker environment.
+RUN touch /etc/bb.env
COPY --from=backend /backend-build/bytebase /usr/local/bin/
COPY --from=backend /etc/ssl/certs /etc/ssl/certs
COPY --from=decompressor /var/opt/bytebase/resources /bytebase/resources
diff --git a/scripts/Dockerfile.render-demo b/scripts/Dockerfile.render-demo
index 2345e5240b..19af187472 100644
--- a/scripts/Dockerfile.render-demo
+++ b/scripts/Dockerfile.render-demo
@@ -98,6 +98,8 @@ ENV PATH="${PATH}:/var/opt/bytebase/resources/postgres-linux-amd64-16/bin"
# - Demo script to launch Bytebase in readonly demo mode
COPY ./scripts /usr/local/bin/
COPY ./scripts/.psqlrc /root/.psqlrc
+# The file indicates running in docker environment.
+RUN touch /etc/bb.env
COPY --from=backend /backend-build/bytebase /usr/local/bin/
COPY --from=backend /etc/ssl/certs /etc/ssl/certs
COPY --from=decompressor /var/opt/bytebase/resources /bytebase/resources