@@ -110,8 +110,8 @@ ArrowTower 是一个基于 Polkadot 生态的地理位置打卡平台,支持
110110- ** 虚拟机** :PolkaVM
111111- ** 测试网络** :Polkadot Hub Testnet
112112- ** 智能合约** :
113- - Minter 合约:` 0x079098fb8e901DE45AB510fA669bdE793DfEBD50 `
114- - NFT 合约:` 0x9373197B94f4633FBc121532F3cF3948FD4a5a15 `
113+ - Minter 合约:` 0x079098fb8e901DE45AB510fA669bdE793DfEBD50 ` * (View on blockchain explorer: [ Blockscout ] ( https://blockscout-passet-hub.parity-testnet.parity.io/address/0x079098fb8e901DE45AB510fA669bdE793DfEBD50 ) ) *
114+ - NFT 合约:` 0x9373197B94f4633FBc121532F3cF3948FD4a5a15 ` * (View on blockchain explorer: [ Blockscout ] ( https://blockscout-passet-hub.parity-testnet.parity.io/token/0x9373197B94f4633FBc121532F3cF3948FD4a5a15 ) ) *
115115
116116![ Snapshot] ( ./pic/Snapshot2.PNG )
117117
@@ -240,6 +240,9 @@ NEXT_PUBLIC_NFT_CONTRACT="0x9373197B94f4633FBc121532F3cF3948FD4a5a15"
240240
241241# 后端铸造私钥(仅服务端)
242242PRIVATE_KEY="your_private_key"
243+
244+ # 初始化使用
245+ ADMIN_ADDRESS="admin wallet addresss"
243246```
244247
245248** 3.3 初始化数据库**
@@ -260,6 +263,89 @@ npm run dev
260263
261264打开浏览器访问 [ http://localhost:3000 ] ( http://localhost:3000 )
262265
266+
267+
268+ ## 🐳 Docker 一键部署(推荐)
269+
270+ 使用 Docker Compose 可以快速启动完整的生产级 ArrowTower 应用栈,包括 PostgreSQL 数据库和 Next.js 应用。
271+
272+ ### 1. 克隆项目
273+
274+ ``` bash
275+ git clone https://github.com/easyshellworld/arrowtower-dapp.git
276+ cd arrowtower-dapp
277+ ```
278+
279+ ### 2. 配置环境变量
280+
281+ 复制示例环境变量文件并根据实际情况修改:
282+
283+ ``` bash
284+ cp .env.example .env
285+ ```
286+
287+ 编辑 ` .env ` 文件,配置以下关键参数:
288+
289+ ``` env
290+ # 数据库配置
291+ POSTGRES_USER=postgres
292+ POSTGRES_PASSWORD=your_secure_password
293+ POSTGRES_DB=arrowtower
294+ DATABASE_URL="postgresql://postgres:your_secure_password@postgres:5432/arrowtower?schema=public"
295+
296+ # NextAuth 配置
297+ NEXTAUTH_SECRET="your_nextauth_secret_here"
298+ NEXTAUTH_URL="http://localhost:30000"
299+
300+ # 网站基础配置
301+ NEXT_PUBLIC_ARROW_TOWER_BASE_URL="http://localhost:30000"
302+
303+ # 智能合约地址
304+ NEXT_PUBLIC_MINTER_CONTRACT="0x079098fb8e901DE45AB510fA669bdE793DfEBD50"
305+ NEXT_PUBLIC_NFT_ADDRESS="0x9373197B94f4633FBc121532F3cF3948FD4a5a15"
306+
307+ # 区块链配置
308+ PRIVATE_KEY="your_private_key_for_backend_minting"
309+ CHAIN_ID="420420421"
310+ RPC_URL="https://rpc.polkadot-hub-paseo-testnet.polkadot.io"
311+ NETWORK="polkadot-hub-paseo-testnet"
312+
313+
314+ # 初始化使用
315+ ADMIN_ADDRESS="admin wallet addresss"
316+ ```
317+
318+ ### 3. 启动服务
319+
320+ 使用 Docker Compose 一键启动所有服务:
321+
322+ ``` bash
323+ docker-compose up -d
324+ ```
325+
326+ 这将自动:
327+ - 拉取并启动 PostgreSQL 16 数据库
328+ - 构建并启动 Next.js 应用
329+ - 配置网络和数据卷
330+ - 执行健康检查
331+
332+ ### 4. 验证部署
333+
334+ 检查服务状态:
335+
336+ ``` bash
337+ docker-compose ps
338+ ```
339+
340+ 查看应用日志:
341+
342+ ``` bash
343+ docker-compose logs -f app
344+ ```
345+
346+ 访问应用:打开浏览器访问 [ http://localhost:30000 ] ( http://localhost:30000 )
347+
348+
263349## 📦 项目结构
264350
265351```
0 commit comments