Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI - services run not aways working #3270

Closed
cdhanna opened this issue Apr 5, 2024 · 1 comment · Fixed by #3374
Closed

CLI - services run not aways working #3270

cdhanna opened this issue Apr 5, 2024 · 1 comment · Fixed by #3374
Assignees
Milestone

Comments

@cdhanna
Copy link
Collaborator

cdhanna commented Apr 5, 2024

The command beam services run is not working for standalone microservices that doesn't have the following folder structure:

TestService/
----services/
----TestService/
----TestServiceCommon/
----TestService.sln

This seems to be because the DockerFile is trying to copy the Common project assuming it's a child of the services/ folder.


When running from Unity, we need to set the DockerBuildContextPath to the unity project root, and set the relative Dockerfile path be relative to the unity root.

"HttpMicroserviceLocalProtocols": {
    "EggSalad": {
      "DockerBuildContextPath": ".",
      "RelativeDockerfilePath": "Assets/Beamable/StandaloneMicroservices~/EggSalad/Dockerfile",
      "BindSrcForHotReloading": {
        "IsReadOnly": false,
        "LocalPath": null,
        "InContainerPath": null
      },
      "HotReloadEnabledEndpoint": null,
      "HotReloadEnabledPort": null,
      "CustomPortBindings": [],
      "CustomBindMounts": [],
      "CustomVolumes": [],
      "CustomEnvironmentVariables": [],
      "InstanceCount": 1
    },

The beamservice signpost file has the assetProjectPath field, which needs to map to the Unity project relative path of the service csproj file. Then, that path becomes the main source for the relative dockerfile path, and the build context path is always ., because Unity CLI .beamable contexts are always at the unity root.

@cdhanna
Copy link
Collaborator Author

cdhanna commented May 2, 2024

convo from beam-backlog-check,

The docker build context is becoming "sort of" implicit. By default, it will become the root of the .beamable folder, however, it needs to be configurable via the configuration-defaults.json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants