openfoodfacts / openfoodfacts-server

Open Food Facts database, API server and web interface - 🐪🦋 Perl, CSS and JS coders welcome 😊 For helping in Python, see Robotoff or taxonomy-editor
GNU Affero General Public License v3.0
611 stars 358 forks source link

Simplify the GitPod flow #10137

Open teolemon opened 2 months ago

teolemon commented 2 months ago

Did anyone manage to run Product Opener fully online on GitPod ? eg: editor VSCode online, and no attempt at SSH-ing the thing to your laptop ?

1) Click on the Install on GitPod button 2) make dev on the terminal of the online VSCode (TODO document this step explicitely in the GitPod file) 3) make up

now, I’m redirected to world.openfoodfacts.localhost, even though I’m fully on GitPod (IDE as well) Being able to have Product Opener use the gitpod VM url instead of the world.openfoodfacts.localhost URL would probably unlock the problem. Note that editing /etc/host on my local machine didn’t solve the issue (Connection refused)

teolemon commented 2 months ago

The tutorial says "Remark: for some Linux distributions, port 80 is reserved. " >> The GitPod environment is iso for all users, so this evasive language is confusing. Is the default GitPod distro impacted or not ?

alexgarel commented 2 months ago

Note, on https://www.gitpod.io/docs/configure/repositories/environment-variables there are env variable we might be able to use.

For example simply adding ${GITPOD_WORKSPACE_URL} to server_name directive in nginx.conf might be sufficient (and adding the variable to nginx container in docker-compose.yml or dev.yml, of course)