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

Install nvm in Dockerfile #2413

Merged
merged 1 commit into from
Apr 27, 2024
Merged

Install nvm in Dockerfile #2413

merged 1 commit into from
Apr 27, 2024

Conversation

tienne-B
Copy link
Member

@tienne-B tienne-B commented Apr 2, 2024

With the advice from. https://stackoverflow.com/a/57344191, the Dockerfile will install nvm in order to install node. This should fix the styling issue reported on FB.

Closes #2410

@tienne-B tienne-B merged commit 1364c22 into develop Apr 27, 2024
4 checks passed
@tienne-B tienne-B deleted the bug/2410 branch April 27, 2024 14:40
@gserranof
Copy link

Sorry for bringing this up. I don't have any specific problem with the commit, but I wanted to point out that it didn't fix the styling issue. Yesterday, I installed it locally with Docker using the develop branch (which already includes this commit, so the files were up-to-date), but I encountered the same issue. Just for context, I have very little knowledge of Python and Django—just a basic understanding—so even though I've managed to solve this, I'm not sure it's the proper way at all.

The issue that caused errors for me, as observed in the browser console, were several 404 errors pointing to some files, specifically style.css, djangojs.js, and app.js, from static/css, static/jsi18n, and static/vue, respectively. Since the Tabbycat repository doesn't have any of these files (the css and jsi18n folders are empty, and the vue folder doesn't exist), I tried to find them in a Tabbycat instance that I know works as intended: Calico. I grabbed the respective files from one of my sites, and after placing them in their respective folders for the local instance, I made a fresh start, and now everything works as intended. To be more specific, I saved the following files: vue/js/app.js, vue/js/app.js.map, css/style.css, and jsi18n/es/djangojs.js.

As I said, I'm not sure if what I did is the best way to solve this issue, nor am I certain if those files are public or if they are Étienne's property (as I found them at Calico but not at Tabbycat). However, I just wanted to try to resolve it as best as I could before pointing you to the issue, in case that could help.

@tienne-B
Copy link
Member Author

tienne-B commented May 1, 2024

Hey @gserranof ! This does not fix the styling issue, that's true. I wanted to push this out though to unblock the CI Docker builds.

The issue can be quickly fixed by using ADD rather than COPY in the Dockerfile:

tabbycat/Dockerfile

Lines 19 to 20 in dd86433

WORKDIR /tcd
COPY . /tcd/

Or, you can run npm run build && dj collectstatic outside Docker for Tabbycat.

It is however much slower so I do want to see if there's an alternative.

Everything here (and Calico) is open-source. These files are just build products from the command above.

@gserranof
Copy link

I'm afraid that hasn't solved it either - I've deployed a new instance editing that line before, but the styling remains broken. Anyway, it's clear that there must be a way more simple solution than mine. I'm happy that this is known; I'll try to find some other way, but I know this is in good hands, so thank you anyway!

@tienne-B
Copy link
Member Author

tienne-B commented May 1, 2024

@gserranof Try using #2420 ?

@gserranof
Copy link

I'm afraid I see no change either!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tabbycat installation problem in Docker
2 participants