Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ COPY --from=frontend /ui/dist /src/ui/dist
ARG VERSION=dev
ARG COMMIT=unknown
ARG BUILD_DATE=unknown
ARG CGO_CFLAGS="-O2 -D__BLST_PORTABLE__"

RUN CGO_ENABLED=1 go build -trimpath \
RUN CGO_ENABLED=1 CGO_CFLAGS="${CGO_CFLAGS}" go build -trimpath \
-ldflags "-X github.com/strahe/synaps3/internal/buildinfo.Version=${VERSION} \
-X github.com/strahe/synaps3/internal/buildinfo.Commit=${COMMIT} \
-X github.com/strahe/synaps3/internal/buildinfo.Date=${BUILD_DATE}" \
Expand Down
8 changes: 8 additions & 0 deletions compose.local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
synaps3:
image: synaps3:local
build:
context: .
dockerfile: Dockerfile
args:
VERSION: local
16 changes: 16 additions & 0 deletions docs/en/getting-started/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ The container stores runtime data under `/var/lib/synaps3`, exposes the S3 API o
- SSH access if the dashboard is reached from another machine.
- A Calibration wallet you can fund, or use the wallet steps below.

## Choose the Image Source

The default deployment uses the published image from `compose.yaml`. Continue with [Prepare Configuration](#prepare-configuration) to use it.

### Build the Image from Source

Install Git, then clone the full source tree and build the image:

```bash
git clone https://github.com/strahe/SynapS3.git
cd SynapS3
docker compose -f compose.yaml -f compose.local.yaml build --no-cache
```

When using the local image, skip the deployment directory and download commands in the next section. For every later command in this guide, replace `docker compose` with `docker compose -f compose.yaml -f compose.local.yaml`.

## Prepare Configuration

Create a deployment directory with the Compose file:
Expand Down
16 changes: 16 additions & 0 deletions docs/zh/getting-started/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ description: 使用 Docker Compose 部署 SynapS3。
- 如果从另一台机器访问仪表盘,需要 SSH 权限。
- 可充值的 Calibration 钱包,或按下面步骤生成并充值。

## 选择镜像来源

默认部署使用 `compose.yaml` 中的发布镜像。使用发布镜像时,继续执行[准备配置](#准备配置)。

### 从源码构建镜像

需要在本地构建镜像时,先安装 Git,再克隆完整源码并构建:

```bash
git clone https://github.com/strahe/SynapS3.git
cd SynapS3
docker compose -f compose.yaml -f compose.local.yaml build --no-cache
```

使用本地镜像时,跳过下一节创建部署目录和下载文件的命令。执行本文后续命令时,将开头的 `docker compose` 替换为 `docker compose -f compose.yaml -f compose.local.yaml`。

## 准备配置

创建部署目录,并下载 Compose 文件:
Expand Down