Hi everyone,
I have some trouble deploying a MyST static site with GitLab CI, and I can’t find a suitable category to find help. I think this tool needs a specific category in this community forum, or is there another place to do so?
Best regards,
arnome
1 Like
Hi there, not sure about the category (although seems like a decent idea), but your Gitlab CI troubles are likely a combination of this issue and maybe this issue.
Take a look at this merge request in progress, where I managed to handle builds in gitlab.
Specifically, you likely need to:
- Set the HOST variable
- For execution, set the Jupyter server IP and allow it to run as root like here
Let me know if it helps.
1 Like
Hi Anton,
Thanks for your reply. I noticed that you use a combination of pixi x jupyter and I try too, but not within a GitLab-Cli for now.
pixi (and the Jupyter environment, of course) are very great tools…
I try the first workaround and set the variable HOST="127.0.0.1" in the .gitlab-ci file as you suggested, but it does not work.
The job process went a step forward and passed the endless waiting process for the Jupyter server, but failed to get the favicon.ico file at the end.
🔌 Server started on port 3000! 🥳 🎉
👉 http://127.0.0.1:3000 👈
💌 GET /article 200 - - 97.904 ms
GET / 200 - - 109.367 ms
GET /article-1 200 - - 98.949 ms
GET /article.json 200 - - 99.102 ms
💌 GET /readme.json 200 - - 101.332 ms
💌 GET /robots.txt 200 - - 1.717 ms
💌 GET /myst-theme.css 200 - - 16.938 ms
GET /article-1.json 200 - - 24.365 ms
⏳ Waiting for response from http://localhost:3000/favicon.ico
💌 GET /favicon.ico 404 - - 127248.462 ms
Fetch of http://localhost:3000/favicon.ico failed with HTTP status 404 for URL: http://localhost:3000/favicon.ico (Attempt #1)
⏳ Waiting for response from http://localhost:3000/favicon.ico
Fetch of http://localhost:3000/favicon.ico failed with HTTP status 404 for URL: http://localhost:3000/favicon.ico (Attempt #2)
💌 GET /favicon.ico 404 - - 127215.549 ms
⏳ Waiting for response from http://localhost:3000/favicon.ico
Fetch of http://localhost:3000/favicon.ico failed with HTTP status 404 for URL: http://localhost:3000/favicon.ico (Attempt #3)
Failed to fetch http://localhost:3000/favicon.ico after 3 attempts.
Myst CLI Versions:
- node 20.19.4 Required: >= 18.0.0
- npm 9.2.0 Required: >=8.6.0
- myst 1.6.6
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
The step that I don’t understand it’s that whereas I set the HOST variable to 127.0.0.1 and this is obviously taken into account in the first step :
🔌 Server started on port 3000! 🥳 🎉
👉 http://127.0.0.1:3000 👈
Then, a few execution steps later, the localhost is back as address to the server :
⏳ Waiting for response from http://localhost:3000/favicon.ico
💌 GET /favicon.ico 404 - - 127248.462 ms
and I don’t know why.
Have you a idea to make this work? ^^
I guess I have to use a custom jupyter_server_config.py file but as I don’t use a jupyter server and just myst command I don’t know how to change this.
[EDIT]: I just try the --keep-host option but the localhost is still present and I don’t know why.
arnome
Other server assets are fetched correctly (response 200), it’s only the favicon that seems missing. This is therefore unlikely related to your CI setup.
Hi @Anton_Akhmerov,
[A few months later…]
I come back with a more specific question about the non-fetching favicon.ico problem in GitLab CI.
As I post here, I don’t really understand why favicon.ico is not fetch by the MyST server in the Docker image, whereas all previous data does.
In your solution on GitHub, you set the custom HOST var env in jupyter_server_conf.py, but in my process with GitLab, there is no need, as far as I know, for such a server.
Is this correct ?
Best regards,
arnome