-
Notifications
You must be signed in to change notification settings - Fork 23
feat: Allow server side configuration of pubsub #26
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
base: main
Are you sure you want to change the base?
Conversation
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. |
@NeoScript @AlbertoMonteiro any chance we could merge this? |
It would be great to merge this. We need to be able to specify FYI @NeoScript 😊 |
@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. |
@NeoScript, help us. Please 🙏. |
There was a problem hiding this 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" |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" | |||
}; |
There was a problem hiding this comment.
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"
Hi, |
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. |
I understand. Thank you for explaining. |
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