-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e81cdd4
Showing
8 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains 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,15 @@ | ||
name: Fly Deploy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: superfly/flyctl-actions/setup-flyctl@master | ||
- run: flyctl deploy --remote-only | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |
This file contains 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,23 @@ | ||
# If you prefer the allow list template instead of the deny list, see community template: | ||
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore | ||
# | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# Go workspace file | ||
go.work | ||
|
||
# fly.toml |
This file contains 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,11 @@ | ||
FROM xhofe/alist:latest | ||
LABEL MAINTAINER="[email protected]" | ||
VOLUME /opt/alist/data/ | ||
WORKDIR /opt/alist/ | ||
COPY entrypoint.sh /entrypoint.sh | ||
COPY install.sh /install.sh | ||
RUN chmod +x /entrypoint.sh /install.sh; \ | ||
/install.sh | ||
ENV PUID=0 PGID=0 UMASK=022 | ||
EXPOSE 5244 6800 | ||
ENTRYPOINT [ "/entrypoint.sh" ] |
This file contains 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,4 @@ | ||
# ALIST-FLY | ||
|
||
是alist务服的fly.io部署形式 | ||
|
This file contains 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 @@ | ||
#!/bin/bash | ||
chown -R ${PUID}:${PGID} /opt/alist/ | ||
|
||
umask ${UMASK} | ||
|
||
exec su-exec ${PUID}:${PGID} nohup aria2c \ | ||
--enable-rpc \ | ||
--rpc-allow-origin-all \ | ||
--conf-path=/root/.aria2/aria2.conf \ | ||
>/dev/null 2>&1 & | ||
|
||
exec su-exec ${PUID}:${PGID} ./alist server --no-prefix |
This file contains 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,52 @@ | ||
# fly.toml app configuration file generated for lushi-alist-v2 on 2023-12-19T01:07:17+08:00 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = "lushi-alist-v2" | ||
primary_region = "hkg" | ||
kill_signal = "SIGINT" | ||
kill_timeout = "5s" | ||
|
||
[experimental] | ||
auto_rollback = true | ||
|
||
[build] | ||
|
||
[[mounts]] | ||
source = "data" | ||
destination = "/opt/alist/data" | ||
auto_extend_size_threshold = 0 | ||
|
||
[http_service] | ||
internal_port = 5244 | ||
force_https = true | ||
auto_stop_machines = false | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ["app"] | ||
|
||
[[services]] | ||
protocol = "tcp" | ||
internal_port = 5244 | ||
min_machines_running = 0 | ||
processes = ["app"] | ||
|
||
[[services.ports]] | ||
port = 80 | ||
handlers = ["http"] | ||
force_https = true | ||
|
||
[[services.ports]] | ||
port = 443 | ||
handlers = ["tls", "http"] | ||
|
||
[[services.tcp_checks]] | ||
interval = "15s" | ||
timeout = "2s" | ||
grace_period = "1s" | ||
|
||
[[vm]] | ||
cpu_kind = "shared" | ||
cpus = 1 | ||
memory_mb = 256 |
This file contains 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,10 @@ | ||
apk add --no-cache aria2 curl | ||
|
||
mkdir -p /root/.aria2 | ||
cd /root/.aria2 | ||
wget https://github.com/P3TERX/aria2.conf/archive/refs/heads/master.tar.gz | ||
tar -zxvf master.tar.gz --strip-components=1 | ||
rm -rf master.tar.gz | ||
sed -i 's|rpc-secret|#rpc-secret|g' ./aria2.conf | ||
touch /root/.aria2/aria2.session | ||
./tracker.sh |