-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[chore] Updated web and deploy backend configuration for reverse proxy & decoupled Plane Deploy URL generation for web #2135
[chore] Updated web and deploy backend configuration for reverse proxy & decoupled Plane Deploy URL generation for web #2135
Conversation
…Deploy URL for deploy
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 6 Ignored Deployments
|
setup.sh
Outdated
echo -e "\nNEXT_PUBLIC_API_BASE_URL=$1\nWEB_URL=$1" >> ./space/.env | ||
if [ -n "$1" ] | ||
then | ||
echo "hello" |
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 remove hello
3010107
into
chore/update-setup-script
…oject-level ENVs (#2115) * chore: Updated Setup Script for Splitting Env File * chore: updated dockerfile for using inproject env varaibles * chore: removed husky replacement script * chore: updated shell script using sed * chore: updated dockerfiles with removed cp statement * chore: added example env for apiserver * chore: refactored secret generation for backend * chore: removed replacement script * chore: updated docker-compose with removed env variables * chore: resolved comments in setup.sh and docker-compose * chore: removed secret key placeholder in apiserver example env * chore: updated root env for project less env variables * chore: removed project level env update from root env logic * chore: updated API_BASE_URL in .env.example * chore: restored docker argument as env NEXT_PUBLIC_API_BASE_URL * chore: added pg missing env variables * [chore] Updated web and deploy backend configuration for reverse proxy & decoupled Plane Deploy URL generation for web (#2135) * chore: removed api url build arg from compose * chore: set public api default argument to black string for self hosted * chore: updated web services to accept blank string as API URL * chore: added env variables for pg compose service * chore: modified space app services to use accept empty string as api base * chore: conditionally trigger web url value based on argument * fix: made web to use identical host with spaces suffix on absense of Deploy URL for deploy * chore: added example env for PUBLIC_DEPLOY Env * chore: updated web dockerfile with addition as PLANE_DEPLOY Argument * API BASE URL global update * API BASE URL replace with api server * api base url fixes * typo fixes --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> * dev: remove API_BASE_URL from environment variable --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
@henit-chobisa, what is the reason/benefit to set however the API calls the frontend does goes to the same host as |
Tasks accomplished:
Previous state:
Current state:
/api
on the same host .spaces
in case if the URL is explicitly specified, the web project will use that URL for Plane Deploy.How I tested the changes
✅ Ran Individual Builds for all three projects
✅ Ran Individual Containers and tested them with environment variables provided and without giving any environment variables for self hosted deployments
✅ Built Individual Docker Compose Services for testing individually with the given environment variables
✅ Built complete docker compose with the given set of environment variables.
Keep this in mind
NEXT_PUBLIC_API_BASE_URL
andNEXT_PUBLIC_DEPLOY_URL
are given as empty strings at the time of the build, which means that the request for bothAPI
andDEPLOY
should be made on the same host as web.NEXT_PUBLIC_API_BASE_URL
&NEXT_PUBLIC_DEPLOY_URL
, these envs can be passed as build args in docker-compose file.