Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
ec77f5adce | |||
d8624be9fe | |||
0478070458 |
@@ -55,6 +55,7 @@ jobs:
|
|||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
@@ -1,6 +1,6 @@
|
|||||||
FROM node:lts-slim AS base
|
FROM node:lts-slim AS base
|
||||||
|
|
||||||
RUN npm install -g holesail@1.10.1
|
RUN npm install -g holesail@2.2.0
|
||||||
|
|
||||||
FROM base AS dev
|
FROM base AS dev
|
||||||
|
|
||||||
|
@@ -101,8 +101,7 @@ services:
|
|||||||
holesail:
|
holesail:
|
||||||
container_name: holesail
|
container_name: holesail
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
network_mode: "host"
|
||||||
- 8989:8989
|
|
||||||
image: anaxios/holesail:latest
|
image: anaxios/holesail:latest
|
||||||
environment:
|
environment:
|
||||||
MODE: client
|
MODE: client
|
||||||
@@ -112,6 +111,8 @@ services:
|
|||||||
KEY: very-super-secret
|
KEY: very-super-secret
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Note:** Client mode only works on Linux, and is incompatible with Windows and Mac.
|
||||||
|
|
||||||
### Filemanager Mode
|
### Filemanager Mode
|
||||||
|
|
||||||
In Filemanager mode, Holesail-docker serves a file manager interface. Example `docker-compose.yml` file:
|
In Filemanager mode, Holesail-docker serves a file manager interface. Example `docker-compose.yml` file:
|
||||||
|
30
run.sh
30
run.sh
@@ -25,9 +25,9 @@ success() {
|
|||||||
print "$GREEN" "$1"
|
print "$GREEN" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
#get_connector_my_mc() {
|
get_connector_my_mc() {
|
||||||
# KEY="$(/usr/local/bin/node /fetch-my-mc-connector.js)"
|
KEY="$(/usr/local/bin/node /fetch-my-mc-connector.js)"
|
||||||
#}
|
}
|
||||||
|
|
||||||
cmd_argument_builder () {
|
cmd_argument_builder () {
|
||||||
local args="";
|
local args="";
|
||||||
@@ -35,16 +35,16 @@ cmd_argument_builder () {
|
|||||||
"client")
|
"client")
|
||||||
[[ "$PORT" ]] && args="$args --port $PORT";
|
[[ "$PORT" ]] && args="$args --port $PORT";
|
||||||
[[ "$HOST" ]] && args="$args --host $HOST";
|
[[ "$HOST" ]] && args="$args --host $HOST";
|
||||||
[[ "$KEY" ]] && args="$args $KEY";
|
[[ "$KEY" ]] && args="$args --connect $KEY";
|
||||||
#[[ "$UDP" = "true" ]] && args="$args --udp";
|
[[ "$UDP" = "true" ]] && args="$args --udp";
|
||||||
;;
|
;;
|
||||||
"server")
|
"server")
|
||||||
[[ "$PORT" ]] && args="$args --live $PORT";
|
[[ "$PORT" ]] && args="$args --live $PORT";
|
||||||
[[ "$HOST" ]] && args="$args --host $HOST";
|
[[ "$HOST" ]] && args="$args --host $HOST";
|
||||||
[[ "$PUBLIC" = "true" ]] && args="$args --public";
|
[[ "$PUBLIC" = "true" ]] && args="$args --public";
|
||||||
[[ "$FORCE" = "true" ]] && args="$args --force";
|
[[ "$FORCE" = "true" ]] && args="$args --force";
|
||||||
[[ "$KEY" ]] && args="$args --connector $KEY";
|
[[ "$KEY" ]] && args="$args --key $KEY";
|
||||||
#[[ "$UDP" = "true" ]] && args="$args --udp";
|
[[ "$UDP" = "true" ]] && args="$args --udp";
|
||||||
;;
|
;;
|
||||||
"filemanager")
|
"filemanager")
|
||||||
args="--filemanager";
|
args="--filemanager";
|
||||||
@@ -56,15 +56,15 @@ cmd_argument_builder () {
|
|||||||
[[ "$ROLE" = "admin" ]] && args="$args --role admin";
|
[[ "$ROLE" = "admin" ]] && args="$args --role admin";
|
||||||
[[ "$ROLE" = "user" ]] && args="$args --role user";
|
[[ "$ROLE" = "user" ]] && args="$args --role user";
|
||||||
[[ "$KEY" ]] && args="$args --key $KEY";
|
[[ "$KEY" ]] && args="$args --key $KEY";
|
||||||
#[[ "$UDP" = "true" ]] && args="$args --udp";
|
[[ "$UDP" = "true" ]] && args="$args --udp";
|
||||||
|
;;
|
||||||
|
"my-mc")
|
||||||
|
if ! get_connector_my_mc; then exit 1; fi
|
||||||
|
[[ "$PORT" ]] && args="$args --port $PORT";
|
||||||
|
[[ "$HOST" ]] && args="$args --host $HOST";
|
||||||
|
[[ "$KEY" ]] && args="$args --connect $KEY";
|
||||||
|
[[ "$UDP" = "true" ]] && args="$args --udp";
|
||||||
;;
|
;;
|
||||||
# "my-mc")
|
|
||||||
# #if ! get_connector_my_mc; then exit 1; fi
|
|
||||||
# [[ "$PORT" ]] && args="$args --port $PORT";
|
|
||||||
# [[ "$HOST" ]] && args="$args --host $HOST";
|
|
||||||
# [[ "$KEY" ]] && args="$args --connect $KEY";
|
|
||||||
# #[[ "$UDP" = "true" ]] && args="$args --udp";
|
|
||||||
# ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
printf "%s" "$args";
|
printf "%s" "$args";
|
||||||
|
Reference in New Issue
Block a user