Skip to content

feat: Allow server side configuration of pubsub #26

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pedromarceOAT
Copy link

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
Copy link

ralphv commented Jan 11, 2025

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

@NeoScript @AlbertoMonteiro any chance we could merge this?

@gawbul
Copy link
Contributor

gawbul commented Feb 11, 2025

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

FYI @NeoScript 😊

@charllysonsouza
Copy link

charllysonsouza commented Apr 3, 2025

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

@AlbertoMonteiro
Copy link
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
Copy link

spalenza commented May 7, 2025

@NeoScript, help us. Please 🙏.

Copy link

@thallesdaniell thallesdaniell left a comment

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"
Copy link

@thallesdaniell thallesdaniell May 9, 2025

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"


@Injectable({
providedIn: 'root'
})
export class PubsubService {
private http = inject(HttpClient);

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

@thallesdaniell thallesdaniell May 9, 2025

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])

"builder": "angular-server-side-configuration:ngsscbuild",
"options": {
"additionalEnvironmentVariables": [
"PUBSUB_EMULATOR_HOST"
Copy link

@thallesdaniell thallesdaniell May 9, 2025

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

@@ -3,7 +3,8 @@
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false
production: false,
pubsubEmulatorHost: process.env['PUBSUB_EMULATOR_HOST'] ?? "http://localhost:8681"
};
Copy link

@thallesdaniell thallesdaniell May 9, 2025

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"

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants