Skip to content
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

GitPod no longer runs with move to docker.cdot.systems #3340

Open
humphd opened this issue Mar 26, 2022 · 0 comments · May be fixed by #3371
Open

GitPod no longer runs with move to docker.cdot.systems #3340

humphd opened this issue Mar 26, 2022 · 0 comments · May be fixed by #3371
Assignees
Labels
area: docker type: bug Something isn't working

Comments

@humphd
Copy link
Contributor

humphd commented Mar 26, 2022

I tried to use GitPod to debug a PR, and our GitPod environment needs an update to use the images we push to docker.cdot.systems:

 HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
eval $(gp env -e API_URL=$(gp url 3000))
eval $(gp env -e WEB_URL=$(gp url 8000))
eval $(gp env -e API_HOST=$(gp url 8443))
eval $(gp env -e SSO_LOGIN_URL=$(gp url 8081))
eval $(gp env -e SUPABASE_API=$(gp url 8911))
eval $(gp env -e SERVICES="status image sso search posts feed-discovery redis elasticsearch login")

sed -r \
    -e  "s@(.+=)http://localhost:8000(/[^ ]*)*@\1$WEB_URL\2@g" \
    -e  "s@(.+=)http://localhost:3000(/[^ ]*)*@\1$API_URL\2@g" \
    -e  "s@(.+=)http://localhost:8081(/[^ ]*)*@\1$SSO_LOGIN_URL\2@g" \
    -e  "s@(.+=)http://kong:8000(/[^ ]*)*@\1$SUPABASE_API\2@g" \
    -e  "s@(.+=)http://localhost([^:]*)@\1$API_HOST\2@g" \
    -e  "s@development\.yml@gitpod\.yml@" \
    config/env.development > .env

} && {
[ -r /workspace/.prebuild-log-0 ] && cat /workspace/.prebuild-log-0; [ -r /workspace/.gitpod/prebuild-log-0 ] && cat /workspace/.gitpod/prebuild-log-0; true
} && {
docker-compose --env-file .env up -d $SERVICES
pnpm start

}
gitpod /workspace/telescope (issue-2909) $  HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
> eval $(gp env -e API_URL=$(gp url 3000))
> eval $(gp env -e WEB_URL=$(gp url 8000))
> eval $(gp env -e API_HOST=$(gp url 8443))
> eval $(gp env -e SSO_LOGIN_URL=$(gp url 8081))
> eval $(gp env -e SUPABASE_API=$(gp url 8911))
> eval $(gp env -e SERVICES="status image sso search posts feed-discovery redis elasticsearch login")
> 
> sed -r \
>     -e  "s@(.+=)http://localhost:8000(/[^ ]*)*@\1$WEB_URL\2@g" \
>     -e  "s@(.+=)http://localhost:3000(/[^ ]*)*@\1$API_URL\2@g" \
>     -e  "s@(.+=)http://localhost:8081(/[^ ]*)*@\1$SSO_LOGIN_URL\2@g" \
>     -e  "s@(.+=)http://kong:8000(/[^ ]*)*@\1$SUPABASE_API\2@g" \
>     -e  "s@(.+=)http://localhost([^:]*)@\1$API_HOST\2@g" \
>     -e  "s@development\.yml@gitpod\.yml@" \
>     config/env.development > .env
> 
> } && {
> [ -r /workspace/.prebuild-log-0 ] && cat /workspace/.prebuild-log-0; [ -r /workspace/.gitpod/prebuild-log-0 ] && cat /workspace/.gitpod/prebuild-log-0; true
> } && {
> docker-compose --env-file .env up -d $SERVICES
> pnpm start
> 
> }
{
eval $(gp env -e API_URL=$(gp url 3000))
eval $(gp env -e WEB_URL=$(gp url 8000))
eval $(gp env -e API_HOST=$(gp url 8443))
eval $(gp env -e SSO_LOGIN_URL=$(gp url 8081))
eval $(gp env -e SUPABASE_API=$(gp url 8911))
eval $(gp env -e SERVICES="status image sso search posts feed-discovery redis elasticsearch login")

sed -r \
    -e  "s@(.+=)http://localhost:8000(/[^ ]*)*@\1$WEB_URL\2@g" \
    -e  "s@(.+=)http://localhost:3000(/[^ ]*)*@\1$API_URL\2@g" \
    -e  "s@(.+=)http://localhost:8081(/[^ ]*)*@\1$SSO_LOGIN_URL\2@g" \
    -e  "s@(.+=)http://kong:8000(/[^ ]*)*@\1$SUPABASE_API\2@g" \
    -e  "s@(.+=)http://localhost([^:]*)@\1$API_HOST\2@g" \
    -e  "s@development\.yml@gitpod\.yml@" \
    config/env.development > .env

} && {
pnpm install & \
docker-compose --env-file .env build $SERVICES & \
docker-compose --env-file .env pull

}; exit
gitpod /workspace/telescope (issue-2909) $ {
> eval $(gp env -e API_URL=$(gp url 3000))
> eval $(gp env -e WEB_URL=$(gp url 8000))
> eval $(gp env -e API_HOST=$(gp url 8443))
> eval $(gp env -e SSO_LOGIN_URL=$(gp url 8081))
> eval $(gp env -e SUPABASE_API=$(gp url 8911))
> eval $(gp env -e SERVICES="status image sso search posts feed-discovery redis elasticsearch login")
> 
> sed -r \
>     -e  "s@(.+=)http://localhost:8000(/[^ ]*)*@\1$WEB_URL\2@g" \
>     -e  "s@(.+=)http://localhost:3000(/[^ ]*)*@\1$API_URL\2@g" \
>     -e  "s@(.+=)http://localhost:8081(/[^ ]*)*@\1$SSO_LOGIN_URL\2@g" \
>     -e  "s@(.+=)http://kong:8000(/[^ ]*)*@\1$SUPABASE_API\2@g" \
>     -e  "s@(.+=)http://localhost([^:]*)@\1$API_HOST\2@g" \
>     -e  "s@development\.yml@gitpod\.yml@" \
>     config/env.development > .env
> 
> } && {
> pnpm install & \
> docker-compose --env-file .env build $SERVICES & \
> docker-compose --env-file .env pull
> 
> }; exit
[1] 559
[2] 560
bash: pnpm: command not found
WARNING: The GIT_COMMIT variable is not set. Defaulting to a blank string.
WARNING: The GIT_COMMIT variable is not set. Defaulting to a blank string.
ERROR: The Compose file is invalid because:
Service image has neither an image nor a build context specified. At least one must be provided.
ERROR: The Compose file is invalid because:
Service search has neither an image nor a build context specified. At least one must be provided.
[1]-  Exit 127                pnpm install
exit

🤙 This task ran as a workspace prebuild

WARNING: The GIT_COMMIT variable is not set. Defaulting to a blank string.
ERROR: The Compose file is invalid because:
Service planet has neither an image nor a build context specified. At least one must be provided.
bash: pnpm: command not found

The fix is to update docker/gitopod.yml to define build and cache_from keys for each of our services, like we do in docker/development.yml.

I also wonder if there is some kind of generalization we can do here for both AWS and GitPod, so that we prefer to pull cached images when possible, and only build what's needed (similar to development.yml), but then do whatever overrides are needed for ports and envs to work in cloud environments.

cc @DukeManh, @cindyledev.

@humphd humphd added type: bug Something isn't working area: docker labels Mar 26, 2022
@TDDR TDDR linked a pull request Mar 31, 2022 that will close this issue
1 task
@TDDR TDDR self-assigned this Mar 31, 2022
@Seneca-CDOT Seneca-CDOT deleted a comment from sirinoks Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docker type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants