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

web directory is missing #76

Closed
manubob opened this issue Aug 22, 2024 · 9 comments
Closed

web directory is missing #76

manubob opened this issue Aug 22, 2024 · 9 comments

Comments

@manubob
Copy link

manubob commented Aug 22, 2024

Hello,
I'm facing to an issue by building docker image from https://github.com/euzu/m3u-filter/wiki/docker
I ran the command but it failed :

14.38 Compiling openssl-src v300.2.3+3.2.1
14.49 Compiling rand_chacha v0.3.1
14.61 Compiling ahash v0.8.11
14.71 Compiling time v0.3.34
14.92 Compiling regex-automata v0.4.6
14.94 Compiling crossbeam-utils v0.8.19
15.02 Compiling url v2.5.0
15.43 Compiling spin v0.9.8
15.45 Compiling openssl-probe v0.1.5
15.69 Compiling untrusted v0.9.0
15.81 error[E0282]: type annotations needed for Box<_>
15.81 --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/src/format_description/parse/mod.rs:83:9
15.81 |
15.81 83 | let items = format_items
15.81 | ^^^^^
15.81 ...
15.81 86 | Ok(items.into())
15.81 | ---- type must be known at this point
15.81 |
15.81 help: consider giving items an explicit type, where the placeholders _ are specified
15.81 |
15.81 83 | let items: Box<_> = format_items
15.81 | ++++++++
15.81
15.83 Compiling adler v1.0.2
16.02 Compiling miniz_oxide v0.7.2
16.04 Compiling actix-service v2.0.2
16.26 Compiling rand v0.8.5
16.42 Compiling digest v0.10.7
16.59 Compiling openssl-sys v0.9.102
16.76 Compiling zstd-sys v2.0.10+zstd.1.5.6
16.78 Compiling libnghttp2-sys v0.1.9+1.58.0
16.99 For more information about this error, try rustc --explain E0282.
17.00 error: could not compile time (lib) due to 1 previous error
17.00 warning: build failed, waiting for other jobs to finish...

Dockerfile:14

12 |
13 | RUN rustup target add x86_64-unknown-linux-musl
14 | >>> RUN cargo build --target x86_64-unknown-linux-musl --release
15 |
16 | FROM node:lts as node-build

ERROR: failed to solve: process "/bin/sh -c cargo build --target x86_64-unknown-linux-musl --release" did not complete successfully: exit code: 101

Could you help please ?
Thanks
Manu

@manubob
Copy link
Author

manubob commented Aug 23, 2024

Issue updated since I discovered that web is not contain into the release and that a build must be done to integrate frontend.

@euzu
Copy link
Owner

euzu commented Aug 23, 2024

Hi @manubob you can simply copy the web directory out of the last release.tar. The web folder only contains html,css,js and media files i. No binaries.

I dont know why your docker build fails, on what os are you compiling?

You can compile the frontend very simple with node , you need to install node then install yarn. Inside the frontemd call yarn then yarn build.

@manubob
Copy link
Author

manubob commented Aug 23, 2024

Hi Enzu,
Ok thank you for the input, I tried to add web directory at the root directory (same level as config, data...) and added a reference into docker-compose to map it but I'm still having the issue when I start the docker:

[2024-08-23T07:44:24Z ERROR m3u_filter] Can't start server: web_root does not exists or is not an directory: "/home/m3u-filter/web"

Docker-Compose:
version: '3'
services:
m3u-filter:
container_name: m3u-filter
network_mode: host
image: ghcr.io/euzu/m3u-filter:latest
volumes:
- /volume1/docker/m3u-filter/data:/data
- /volume1/docker/m3u-filter/config:/config
- /volume1/docker/m3u-filter/backup:/backup
- /volume1/docker/m3u-filter/downloads:/downloads
- /volume1/docker/m3u-filter/web:/web
environment:
- TZ=xxxxx
- PUID=xxxxx
- PGID=xxxx
- M3U_FILTER_LOG=debug
ports:
- "8901:8901"
restart: unless-stopped

Perhaps the web folder should be in a different level in my tree ?

For the OS compilation, I tried with Ubuntu on WSL2 on Windows.

Thanks again

@euzu
Copy link
Owner

euzu commented Aug 23, 2024

@manubob the error you are getting is comming from the time crate time-rs-issue.
I will update the dependency to fix this issue

@euzu
Copy link
Owner

euzu commented Aug 23, 2024

@manubob for the problem web root not found, in the config.yml write web_root: /home/m3u-filter/web

Normally this is not necessary when Working dir is set to /home/m3u-filter

@manubob
Copy link
Author

manubob commented Aug 23, 2024

Hi @euzu
Here my config.yml, web_root is already defined but working dir is different. Should I remove "/data" ?

api: { host: 127.0.0.1, port: 8901, web_root: /home/m3u-filter/web }
threads: 0
working_dir: /home/m3u-filter/data

@euzu
Copy link
Owner

euzu commented Aug 23, 2024

@manubob the working dir in the config is ok, i meant the docker working dir not the m3u-filer working dir.

@manubob
Copy link
Author

manubob commented Aug 23, 2024

Hi @euzu
Ok so I tested and here my result :

  • Docker failed to create container when I added : working_dir: /home/m3u-filter in my docker-compose.
  • Docker create container but web error when I added : working_dir: /
  • Docker create container but web error when removed working_dir

If you don't have idea, let's retry once you fixed the time-rs-issue by building the docker image.

@manubob
Copy link
Author

manubob commented Aug 23, 2024

Hi @euzu
I editer the reference of web like this and it works !

  • /volume1/docker/m3u-filter/web:/web
    Thanks for your support

@manubob manubob closed this as completed Aug 23, 2024
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

No branches or pull requests

2 participants