Skip to content

Commit

Permalink
feat: update document
Browse files Browse the repository at this point in the history
  • Loading branch information
nana4rider committed Jan 26, 2025
1 parent 3d4e7e4 commit 321d89e
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,30 @@ ECHONET Liteプロトコルを使用して、Wi-SUN対応スマートメータ

必要な環境変数については[こちら](https://github.com/nana4rider/wisun2mqtt/blob/main/src/env.ts)をご確認ください。

### Production
### Native

```sh
npm install
npm run build
node dist/index
```

### Development

```sh
npm install
npm run dev
node --env-file=.env dist/index
```

### Docker

```sh
# PAN情報をホスト側に配置するとスキャンを省略し、次回からの接続が早くなります。
# .paninfo をホスト側に配置するとスキャン結果がコンテナ再起動後も残るため、次回からの接続が早くなります。
touch .paninfo

docker run -d \
--name wisun2mqtt \
--device /dev/ttyUSB0:/dev/ttyUSB0 \
-v /dev/ttyUSB0:/dev/ttyUSB0 \
-v $(pwd)/.paninfo.json:/app/.paninfo.json \
-p 3000:3000 \
--env-file .env \
-p 3000:3000 \
--restart always \
nana4rider/wisun2mqtt:latest
```

> [!TIP]
> 必要な環境変数については[こちら](src/env.ts)をご確認ください。

0 comments on commit 321d89e

Please sign in to comment.