userstyles-world / userstyles.world

⭐ Website to browse and share UserCSS userstyles. A modern replacement for UserStyles.org made by the userstyles community.
https://userstyles.world
GNU Affero General Public License v3.0
322 stars 15 forks source link

docker #258

Closed Li-Gru closed 1 year ago

Li-Gru commented 1 year ago

add Dockerfile + docker-entrypoint.sh add docker-compose.yaml

astyled commented 1 year ago

Originally that issue was for @vednoc not to forget try come back to it later. Now you're ahead of him!

Tried to compose, got the following:

 => ERROR [app stage-0 7/7] RUN set -x  && for f in web/scss/*.scss; do sassc --style nested --sourcemap=inline -l "$f" "web/static/css/$(basename  1.6s
------                                                                                                                                                   
 > [app stage-0 7/7] RUN set -x  && for f in web/scss/*.scss; do sassc --style nested --sourcemap=inline -l "$f" "web/static/css/$(basename $f .scss).css";done  && go build -v -o bin/userstyles-fonts cmd/userstyles-fonts/main.go  && go build -v -o bin/userstyles-ts cmd/userstyles-ts/main.go  && go build -v -o bin/userstyles -tags "fts5" cmd/userstyles-world/main.go:  
#0 1.085 + basename web/scss/main.scss .scss                                                                                                             
#0 1.087 + sassc --style nested '--sourcemap=inline' -l web/scss/main.scss web/static/css/main.css                                                       
#0 1.179 Error opening output file: No such file or directory
#0 1.182 + basename web/scss/view_redesign.scss .scss
#0 1.183 + sassc --style nested '--sourcemap=inline' -l web/scss/view_redesign.scss web/static/css/view_redesign.css
#0 1.193 Error opening output file: No such file or directory
------
failed to solve: process "/bin/sh -c set -x  && for f in web/scss/*.scss; do sassc --style nested --sourcemap=inline -l \"$f\" \"web/static/css/$(basename $f .scss).css\";done  && go build -v -o bin/userstyles-fonts cmd/userstyles-fonts/main.go  && go build -v -o bin/userstyles-ts cmd/userstyles-ts/main.go  && go build -v -o bin/userstyles -tags \"fts5\" cmd/userstyles-world/main.go" did not complete successfully: exit code: 65

Seems to be some paths or go-specific problem, IDK.

Li-Gru commented 1 year ago

@a0eoc fix https://github.com/userstyles-world/userstyles.world/pull/258/commits/2b25784c6e78be6f80cfdb5b29836d796c8c14a4

astyled commented 1 year ago

Now it ran for a little bit longer and gave me package cmd/userstyles-fonts/main.go is not in GOROOT (/usr/local/go/src/cmd/userstyles-fonts/main.go) which is docker/go specific. I had this issue before with Flatpak version of VSCodium but can't offer anything to fix.

I should notice that we do PATH=$PATH:$HOME/go/bin to build it with run tool.

Li-Gru commented 1 year ago

@a0eoc what system are you building on? I build on macos and linux-debian on docker and podman without any problems...

try git reset --hard ; git clean -fdx before build

astyled commented 1 year ago

@Li-Gru yeah there was some git issue which I just noticed and fixed.. Now it works! @vednoc is digging the thing to improve performance so the PR stays for now.

Li-Gru commented 1 year ago

@vednoc does this solve a development or delivery problem? I saw this as a delivery problem. you don't supply images for local deployment

vednoc commented 1 year ago

I believe my changes solve the former, your changes solve the letter. We can combine them to solve both problems. Additionally, I'd like to add some other services to help during development.

vednoc commented 1 year ago

Hey @Li-Gru, I believe we had a misunderstanding and I'm unsure how to move forward. If you don't mind, I would reopen this PR and merge your changes. Afterwards, I will add a separate configuration that resolves the development problem. My idea was to implement them both in this PR, but I'll take care of the rest since I have it (mostly) figured out.

Li-Gru commented 1 year ago

I don't mind, I just solved my problem