{"id":15064530,"url":"https://github.com/heycn/mangosteen-1","last_synced_at":"2026-01-03T02:07:37.027Z","repository":{"id":140223753,"uuid":"606123616","full_name":"heycn/mangosteen-1","owner":"heycn","description":"移动端记账本 - 后端","archived":false,"fork":false,"pushed_at":"2023-04-08T15:59:49.000Z","size":300,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T10:14:22.393Z","etag":null,"topics":["rails7","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heycn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-24T16:47:41.000Z","updated_at":"2023-03-07T04:24:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"351d7566-0f31-404f-a6df-0dc1110da61b","html_url":"https://github.com/heycn/mangosteen-1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heycn%2Fmangosteen-1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heycn%2Fmangosteen-1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heycn%2Fmangosteen-1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heycn%2Fmangosteen-1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heycn","download_url":"https://codeload.github.com/heycn/mangosteen-1/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790999,"owners_count":20348385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rails7","ruby","ruby-on-rails"],"created_at":"2024-09-25T00:19:54.550Z","updated_at":"2026-01-03T02:07:36.993Z","avatar_url":"https://github.com/heycn.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\n## 部署脚本\n\n```bash\nbin/pack_for_remote.sh\nfrontend=yes need_migrate=yes bin/pack_for_remote.sh\n```\n\n其中\n\n1. frontend 表示是否需要打包和上传前端代码\n2. need_migrate 表示是否需要 migrate 数据库\n\n## 开发配置\n\n### 数据库创建\n\n```\ndocker run -d --name db-for-mangosteen -e POSTGRES_USER=mangosteen -e POSTGRES_PASSWORD=123456 -e POSTGRES_DB=mangosteen_dev -e PGDATA=/var/lib/postgresql/data/pgdata -v mangosteen-data:/var/lib/postgresql/data --network=network1 postgres:14\n```\n\n### 创建密钥\n\n创建密钥分两种情况：\n\n一，如果你想保留之前创建的 `config/master.key` 和 `config/credentials.yml.enc` 两个文件，就直接把之前的文件复制到本项目的 config 里。\n\n二，如果你之前没有创建过 `config/master.key` 和 `config/credentials.yml.enc` 两个文件，就按下面的步骤做：\n\n```\nrm config/credentials.yml.enc\nEDITOR=\"code --wait\" rails credentials:edit\n```\n\n在打开的文件中写下如下内容（其中 xxx 应该是一串密码或者一串随机字符串，如果你不知道怎么生成随机，那么你可以运行 bin/rails c 然后执行 SecureRandom.hex(64) 即可）：\n\n```\nsecret_key_base: xxx\nemail_password: xxx\nhmac_secret: xxx\n```\n\n这样，你就得到了 `config/master.key` 和 `config/credentials.yml.enc` 两个文件。此时你应该提交代码。\n\n### 启动应用\n\n```\nbin/rails s\n或者\nbundle exec rails s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheycn%2Fmangosteen-1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheycn%2Fmangosteen-1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheycn%2Fmangosteen-1/lists"}