forked from Snawoot/shadowsocks-heroku
-
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.
Merge pull request Snawoot#1 from Snawoot/new_cfg_templater
Build and startup improvements
- Loading branch information
Showing
6 changed files
with
46 additions
and
92 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 |
---|---|---|
@@ -1,17 +1,27 @@ | ||
FROM debian:sid | ||
|
||
RUN set -ex\ | ||
&& apt update -y \ | ||
&& apt upgrade -y \ | ||
&& apt install -y wget unzip qrencode\ | ||
&& apt install -y shadowsocks-libev\ | ||
&& apt install -y nginx\ | ||
&& apt autoremove -y | ||
ARG V2RAY_VERSION=v1.3.1 | ||
|
||
COPY wwwroot.tar.gz /wwwroot/wwwroot.tar.gz | ||
COPY conf/ /conf | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
RUN chmod +x /entrypoint.sh | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN set -ex\ | ||
&& apt update -y \ | ||
&& apt upgrade -y \ | ||
&& apt install -y wget unzip qrencode \ | ||
&& apt install -y shadowsocks-libev \ | ||
&& apt install -y nginx-light \ | ||
&& apt autoremove -y \ | ||
&& apt clean -y \ | ||
&& tar xvf /wwwroot/wwwroot.tar.gz -C /wwwroot \ | ||
&& rm -rf /wwwroot/wwwroot.tar.gz \ | ||
&& chmod +x /entrypoint.sh \ | ||
&& mkdir -p /etc/shadowsocks-libev /v2raybin \ | ||
&& wget -O- "https://github.com/shadowsocks/v2ray-plugin/releases/download/${V2RAY_VERSION}/v2ray-plugin-linux-amd64-${V2RAY_VERSION}.tar.gz" | \ | ||
tar zx -C /v2raybin \ | ||
&& install /v2raybin/v2ray-plugin_linux_amd64 /usr/bin/v2ray-plugin \ | ||
&& rm -rf /v2raybin | ||
|
||
CMD /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
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
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
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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
# The content of the top grid comment will be removed during sed processing and will not appear in the final configuration file | ||
#!/bin/bash | ||
# Fast_open must be false on heroku | ||
cat <<EOF | ||
{ | ||
"server":"127.0.0.1", | ||
"server_port":"2333", | ||
"password":"${PASSWORD}", | ||
"timeout":300, | ||
"method":"${ENCRYPT}", | ||
"mode": "tcp_and_udp", | ||
"mode": "tcp_only", | ||
"fast_open":false, | ||
"reuse_port":true, | ||
"no_delay":true, | ||
"plugin": "v2ray-plugin", | ||
"plugin_opts":"server;path=${V2_Path}" | ||
} | ||
EOF |
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