Skip to content

feat: Allow server side configuration of pubsub#26

Open
pedromarceOAT wants to merge 1 commit into
NeoScript:mainfrom
pedromarceOAT:main
Open

feat: Allow server side configuration of pubsub#26
pedromarceOAT wants to merge 1 commit into
NeoScript:mainfrom
pedromarceOAT:main

Conversation

@pedromarceOAT

Copy link
Copy Markdown

Allow external configuration to be provided to configure URL of the pubsub emulator.

Needs to be provided as an environment variable in the docker container "PUBSUB_EMULATOR_HOST"

Should solve this issue #25

@ralphv

ralphv commented Jan 11, 2025

Copy link
Copy Markdown

This is very important to make this image useful, especially when using in ephemeral testing environments using tools like garden.io please do merge this as soon as possible. Thank you.

@btiwaree

Copy link
Copy Markdown

@NeoScript @AlbertoMonteiro any chance we could merge this?

@gawbul

gawbul commented Feb 11, 2025

Copy link
Copy Markdown
Contributor

It would be great to merge this. We need to be able to specify PUBSUB_EMULATOR_HOST too.

FYI @NeoScript 😊

@charllysonsouza

charllysonsouza commented Apr 3, 2025

Copy link
Copy Markdown

@NeoScript @AlbertoMonteiro What are the chances of this being merged? I need this feature.

@AlbertoMonteiro

Copy link
Copy Markdown
Contributor

@NeoScript @AlbertoMonteiro What are the chances of this being merged? I need this feature.

I can't do anything about that.

@NeoScript is the repo owner, only he can do it.

@spalenza

spalenza commented May 7, 2025

Copy link
Copy Markdown

@NeoScript, help us. Please 🙏.

@thallesdaniell thallesdaniell left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to leave a suggestion to add also along with variavel of environment pubsub-emulator the project_id. It would make the setup of the environment more flexible and already have these two settings reduces the cognitive load.

To end could add in the various docker-compose environments

    environment:
      PUBSUB_EMULATOR_HOST: localhost:8681 #https://idp-remot.paas:8085
      PROJECT_ID: test-project

export const environment = {
production: true
production: true,
pubsubEmulatorHost: process.env['PUBSUB_EMULATOR_HOST'] ?? "http://localhost:8681"

@thallesdaniell thallesdaniell May 9, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise (non-blocking):
Can we add the PROJECT_ID along with the pubsub host?

projectId: process.env['PROJECT_ID'] ?? "test-project"

private http = inject(HttpClient);

public _currentHost$ = new BehaviorSubject<string>("http://localhost:8681")
public _currentHost$ = new BehaviorSubject<string>(environment.pubsubEmulatorHost)

@thallesdaniell thallesdaniell May 9, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise (non-blocking):

Can we add the PROJECT_ID along with the pubsub host? Suggestion line 36.

this._projectList.next([environment.projectId])

Comment thread webapp/angular.json
"builder": "angular-server-side-configuration:ngsscbuild",
"options": {
"additionalEnvironmentVariables": [
"PUBSUB_EMULATOR_HOST"

@thallesdaniell thallesdaniell May 9, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise (non-blocking):
Can we add the PROJECT_ID along with the pubsub host?

PROJECT_ID

production: false
production: false,
pubsubEmulatorHost: process.env['PUBSUB_EMULATOR_HOST'] ?? "http://localhost:8681"
};

@thallesdaniell thallesdaniell May 9, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise (non-blocking):
Can we add the PROJECT_ID along with the pubsub host?

projectId: process.env['PROJECT_ID'] ?? "test-project"

@JaSei

JaSei commented Jun 11, 2025

Copy link
Copy Markdown

Hi,
The author clearly doesn't like this PR because he is working on the repo, yet he hasn't commented here. In my opinion, this feature is crucial. What if we fork this repo with this feature and create a container as well?

@ralphv

ralphv commented Jun 11, 2025

Copy link
Copy Markdown

I think the problem is not as simple as providing an env variable.The website doesn't have a way to pull data from backend, it's all purely frontend. I solved this issue manually by using multi stage builds and manually updating the endpoint in the build process. It's definitely not the right way of doing this but it unblocked me.

@JaSei

JaSei commented Jun 11, 2025

Copy link
Copy Markdown

I understand. Thank you for explaining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants