# 部署 Helium 启动 psql: ```sh docker run -d \ --name postgres-sqlx \ -e POSTGRES_PASSWORD=rootpasswordshinnku \ -e POSTGRES_DB=helium \ -p 5432:5432 \ postgres:17 export DATABASE_URL="postgresql://postgres:rootpasswordshinnku@localhost:5432/helium" sqlx migrate run ``` 启动 redis rabbitmq ```sh docker compose up -d redis rabbitmq ``` 链接网络 ```sh docker network connect helium_default postgres-sqlx ``` 初始化: ```sh docker run --rm -it \ --network helium_default \ -v "$(pwd)/target/release/helium-cli:/usr/local/bin/helium-cli:ro" \ -v "$(pwd)/migrations:/migrations:ro" \ debian:bookworm-slim \ helium-cli \ --database-url "postgres://postgres:rootpasswordshinnku@postgres-sqlx:5432/helium" \ --redis-url "redis://helium-redis:6379" \ init-config ``` 查询config: ```sh docker exec postgres-sqlx psql -U postgres -d helium -c "SELECT * FROM application__config;" ``` 填写邮箱配置 ```sh docker exec postgres-sqlx psql -U postgres -d helium -c "UPDATE application__config SET content = '{\"host\": \"mail.sidecloud.cc\", \"port\": 2525, \"username\": \"admin-congyu-moe/murasame\", \"password\": \"mYRuLCPHt5r2WQrBO1YLy6JC\", \"sender\": \"verify@mail.congyu.moe\", \"starttls\": false}' WHERE key = 'mailer';" ``` 查询所有docker容器地址 ```sh docker ps --format "{{.Names}}" | xargs -I {} sh -c 'echo -n "{}: "; docker inspect {} --format "{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}"' ``` 生成最初始的admin ```sh docker run --rm -it \ --network helium_default \ -v "$(pwd)/target/release/helium-cli:/usr/local/bin/helium-cli:ro" \ debian:bookworm-slim \ helium-cli \ --database-url "postgres://postgres:rootpasswordshinnku@postgres-sqlx:5432/helium" \ --redis-url "redis://helium-redis:6379" \ admin create \ --name "murasame" \ --role super_admin \ --email "admin@congyu.moe" Successfully created admin account: ID: 4d054c28-a3f5-4d88-ab60-9604f9aacb41 Name: murasame Role: Super Admin Email: admin@congyu.moe Avatar: N/A Admin key created: Key ID: 1 Key Name: murasame Initial Key Token: He-kNyQK2jNPkbNJQ6qO9LLm4yY3ilbrOvg4IDL5XDF0t272GHLpId3X69hqBZUwdYP ``` other great ```sh docker compose down docker compose build frontend docker compose up -d --no-deps frontend ```