-
-
Notifications
You must be signed in to change notification settings - Fork 41
Correct compile errors #15
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
Open
tcely
wants to merge
30
commits into
kikkia:master
Choose a base branch
from
tcely:tcely-ejs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
3611d41
Add a submodule for `ejs`
tcely c031193
Remove `ejs` from .gitignore
tcely fe537a5
Update `ejs` with git in Dockerfile
tcely 862abe7
Checkout submodules recursively
tcely c8609a3
Create deno.json
tcely b499a59
Update imports to use jsr
tcely 61e8aa3
Remove old work-arounds
tcely e0b1488
Delete scripts directory
tcely a179f23
Update imports to use jsr in server.ts
tcely d7792a4
Use a later version of std/http
tcely cb5398f
Add imports for src/playerCache.ts
tcely 3db5cd8
Use imports from deno.json
tcely 19b3cb0
Create deno.lock
tcely 0d20392
Update Dockerfile
tcely 55c3c3b
Merge branch 'kikkia:master' into tcely-Dockerfile
tcely aa23c49
Handle HOME returning undefined
tcely 23d783d
Set the owner with COPY
tcely 0015643
Merge pull request #1 from tcely/tcely-Dockerfile
tcely 841fc81
Re-work cache_prefix logic
tcely fb889f8
Switch to the debian13 image
tcely a21e6af
Adjust Dockerfile based on review
tcely f7d15ec
Merge branch 'master' into tcely-ejs
tcely cea36e2
update lock
PadowYT2 646fc4b
use esm.sh instead of a submodule for ejs
PadowYT2 be1525e
Merge pull request #5 from PadowYT2/tcely-ejs
tcely aa90b10
Clean up imports from the ejs submodule
tcely 99b9002
Use the mapped import in server.ts
tcely aa11306
Update deno.lock
tcely 39c7cca
Update README.md
tcely 532a331
Undo workflow change for submodules
tcely File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| ejs/ | ||
| .vscode/ | ||
| .vscode/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,37 @@ | ||
| FROM denoland/deno:latest AS builder | ||
| ARG XDG_CACHE_HOME | ||
|
|
||
| WORKDIR /usr/src/app | ||
|
|
||
| RUN apt-get update && apt-get install -y git | ||
|
|
||
| RUN git clone https://github.com/yt-dlp/ejs.git | ||
| # Pin to a specific commit | ||
| RUN cd ejs && git checkout 2655b1f55f98e5870d4e124704a21f4d793b4e1c && cd .. | ||
| FROM denoland/deno:debian AS builder | ||
|
|
||
| COPY scripts/patch-ejs.ts ./scripts/patch-ejs.ts | ||
| RUN deno run --allow-read --allow-write ./scripts/patch-ejs.ts | ||
|
|
||
| RUN rm -rf ./ejs/.git ./ejs/node_modules || true | ||
| WORKDIR /usr/src/app | ||
|
|
||
| COPY . . | ||
|
|
||
| RUN deno compile \ | ||
| --no-check \ | ||
| --output server \ | ||
| --allow-net --allow-read --allow-write --allow-env \ | ||
| --include worker.ts \ | ||
| server.ts | ||
|
|
||
| RUN mkdir -p /usr/src/app/player_cache && \ | ||
| chown -R deno:deno /usr/src/app/player_cache | ||
|
|
||
| FROM gcr.io/distroless/cc-debian12 | ||
| FROM gcr.io/distroless/cc-debian13:debug | ||
| SHELL ["/busybox/busybox", "sh", "-c"] | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY --from=builder /tini /tini | ||
| COPY --from=builder /usr/src/app/server /app/server | ||
|
|
||
| COPY --from=builder --chown=nonroot:nonroot /usr/src/app/player_cache /app/player_cache | ||
| COPY --from=builder --chown=nonroot:nonroot /usr/src/app/docs /app/docs | ||
|
|
||
| USER nonroot | ||
| ARG XDG_CACHE_HOME | ||
| ENV XDG_CACHE_HOME="${XDG_CACHE_HOME}" | ||
| # Create the fall-back cache directories | ||
| RUN install -v -d -o nonroot -g nonroot -m 750 \ | ||
| /app/player_cache /home/nonroot/.cache && \ | ||
| test -z "${XDG_CACHE_HOME}" || install -v -d -m 1777 "${XDG_CACHE_HOME}" | ||
|
|
||
| EXPOSE 8001 | ||
| ENTRYPOINT ["/app/server"] | ||
| USER nonroot | ||
| ENTRYPOINT ["/tini", "--"] | ||
| # Run the server as nonroot even when /tini runs as root | ||
| # CMD ["/busybox/busybox", "su", "-s", "/app/server", "nonroot"] | ||
| CMD ["/app/server"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "lib": [ "deno.worker" ] | ||
| }, | ||
| "imports": { | ||
| "@std/crypto": "jsr:@std/crypto@^0.224.0", | ||
| "@std/fs": "jsr:@std/fs@^0.224.0", | ||
| "@std/http": "jsr:@std/http@0.224.5", | ||
| "@std/path": "jsr:@std/path@^0.224.0", | ||
| "ejs/": "https://esm.sh/gh/yt-dlp/ejs@0.3.0&standalone/" | ||
| } | ||
| } |
|
tcely marked this conversation as resolved.
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.