Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sffxzzp committed Jan 7, 2024
1 parent fb6ba3c commit 4ebeaf9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ EXPOSE 1242
WORKDIR /app
COPY Caddyfile /app/
COPY entrypoint.sh /app/
COPY IPC.config /app/config/

# VOLUME ["/app/config/", "/app/logs/"]
HEALTHCHECK CMD ["pidof", "-q", "dotnet"]
ENTRYPOINT ["/bin/bash", "/app/entrypoint.sh"]
ENTRYPOINT ["/bin/bash", "/app/entrypoint.sh"]
17 changes: 8 additions & 9 deletions IPC.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"Kestrel": {
"Endpoints": {
"IPv4-http": {
"Url": "http://*:1242"
}
},
"PathBase": "/"
}
}
"Kestrel": {
"Endpoints": {
"HTTP": {
"Url": "http://*:1242"
}
}
}
}
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ ArchiSteamFarm(简称为 ASF),但使用 Caddy 作为 Steam 社区的反代

### 提前准备

新建 `~/asf/` 目录,并于其下创建 `config``logs` 目录。
新建一个目录,用于保存 `config``logs` 目录。

准备好 ASF 配置文件,放置于 `~/asf/config` 目录下即可
之后执行代码即可

### Docker 仓库

Expand All @@ -30,17 +30,19 @@ ghcr.io/sffxzzp/asfcn:latest
使用在线镜像,保持程序在后台运行:

``` shell
docker run -d --name asf -p 1242:1242 -v ~/asf/config:/app/config -v ~/asf/logs:/app/logs --rm sffxzzp/asfcn:latest
docker run --user $(id -u):$(id -g) -d --name asf -p 1242:1242 -v $PWD/config:/app/config -v $PWD/logs:/app/logs --rm sffxzzp/asfcn:latest
```

或者,在前台运行:
或者,在前台运行(可以开个 screen,然后运行)

``` shell
docker run -it --name asf -p 1242:1242 -v ~/asf/config:/app/config -v ~/asf/logs:/app/logs --rm sffxzzp/asfcn:latest
docker run --user $(id -u):$(id -g) -it --name asf -p 1242:1242 -v $PWD/config:/app/config -v $PWD/logs:/app/logs --rm sffxzzp/asfcn:latest
```

或者,克隆仓库后用 `Dockerfile` 自行构建镜像(可省略,省略后会自动拉取在线仓库):

``` shell
docker build -t sffxzzp/asfcn:latest .
```

运行之后,将 ASF 的各种配置文件放入 `config` 目录即可。
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
echo '127.0.0.1 steamcommunity.com www.steamcommunity.com store.steampowered.com' >> /etc/hosts
echo '{"Kestrel":{"Endpoints":{"HTTP":{"Url":"http://*:1242"}}}}' >> /app/config/IPC.config
caddy start --config /app/Caddyfile
bash /app/ArchiSteamFarm-Service.sh --no-restart --process-required --system-required

0 comments on commit 4ebeaf9

Please sign in to comment.