-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
@sladyn98 I think at this point. in order to get this PR merged, you have to rebase and determine if there are any fixes that need to be incorporated. This is sort of a large change. so it makes sense to essentially start again with this PR |
@kwhetstone Fixed conflicts and it works. |
a) Check if the environment variables are set during startup. Maybe set a default. LOG message as to what the default is. |
Need to make the readme up to date with all of the build instructions |
Please rebase this branch on the latest master. On your local computer, the operations would be to |
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 added to the design document the requirements for the configurable URL where configurations are stored.
What is needed in this PR:
- details in the README of how to change the values of the REACT_APP_API_URL (which files to change), for each use case (docker, non-docker)
- same details for how to change the REACT_APP_GITHUB_COMMUNITY_URL (which file to change)
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 am also getting a new issue, see #137
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.
Please rebase this PR.
@kwhetstone @martinda I tested this |
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.
Getting the 404 when changing the community link is the biggest unsolved problem.
Now I know why these port numbers have been confusing me. Without docker, the port is localhost:3001, but with docker, the port becomes localhost:3000. A table in the README file would make this obvious. |
Can you make sure REACT_APP_API_URL is set to / in Dockerfile.infra? FYI env variables are replaced at compile time, so its not something that can be configured at run time for different servers. Longer term it might be better for spring boot to handle configuration so it can be changed without having to rebuild the entire javascript app
|
I am not sure how am I to do this? Since this env file is controlled by the .env file |
Sorry it's space not equals
|
Do I add it to the dockerfile infra? |
Yep, Dockerfile.infra, in the last FROM block maybe around the EXPOSE https://github.com/jenkinsci/custom-distribution-service/blob/master/Dockerfile.infra#L36 |
Oh wait. It needs to be set before npm build in the front-end section in the middle |
@halkeye Does this look alright ? |
looks right. does it build?
|
@halkeye Yeah it builds |
@martinda @kwhetstone Can we merge this in as is, and fix the issues later if there are any, since this was a lot of work and it has been open for more than a month now, the more we delay i guess the more we would have to keep fixing this. |
This PR tries to use multiple environments so that the host:name can be modified when the docker compose is run and the when the local environment is run.
For now I am using a library called as
env-cmd
. I created a.env.docker
in which theAPI_URL
connects to the required app server when the docker compose is used.In order to insert the new environment file I defined a new script calledstart:socker
inside of scripts which runs usingnpm run start:docker
to insert the new environment file. When the docker compose is not used it defaults to the normal.env
file.When you run this pr using maven and npm it runs perfectly but fails with docker-compose
Update: This is now working. Can someone test it on their machine