{"id":19999126,"url":"https://github.com/mr-addict/stas-joinus","last_synced_at":"2026-01-04T14:51:17.092Z","repository":{"id":183362160,"uuid":"670000613","full_name":"MR-Addict/stas-joinus","owner":"MR-Addict","description":"校大学生科协报名表单","archived":false,"fork":false,"pushed_at":"2024-09-12T19:21:35.000Z","size":1702,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-13T08:25:08.659Z","etag":null,"topics":["docker","fiber","golang","svelte"],"latest_commit_sha":null,"homepage":"https://stas.doiry.cn","language":"Svelte","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/MR-Addict.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-07-24T04:37:40.000Z","updated_at":"2024-09-12T19:21:38.000Z","dependencies_parsed_at":"2024-08-26T17:04:01.241Z","dependency_job_id":"28d44779-eac5-4e8a-a3e9-36ccd10a7162","html_url":"https://github.com/MR-Addict/stas-joinus","commit_stats":null,"previous_names":["mr-addict/stas-joinus"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MR-Addict%2Fstas-joinus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MR-Addict%2Fstas-joinus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MR-Addict%2Fstas-joinus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MR-Addict%2Fstas-joinus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MR-Addict","download_url":"https://codeload.github.com/MR-Addict/stas-joinus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224393899,"owners_count":17303725,"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":["docker","fiber","golang","svelte"],"created_at":"2024-11-13T05:10:37.215Z","updated_at":"2026-01-04T14:51:17.086Z","avatar_url":"https://github.com/MR-Addict.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 校大学生科协报名表单 ![docker](https://github.com/MR-Addict/stas-joinus/actions/workflows/docker.yml/badge.svg)\n\n\u003cimg src=\"preview.jpg\" alt=\"preview\" width=\"400\"\u003e\n\n本项目采用 monorepo 的形式，将前后端放在一个 git 仓库当中。\n\n前端是 [Svelte](https://svelte.dev)，后端是 [GO](https://go.dev)，分别放在了 `client` 和 `server` 两个目录中，最后可以编译成一个很小的 Docker 镜像，你可以直接从 Docker Hub 拉取该镜像。\n\n## 1. 环境变量\n\n本项目用到了以下几个环境变量：\n\n| 变量名     | 解释                     | 备注                                 |\n| :--------- | :----------------------- | :----------------------------------- |\n| START_TIME | 报名开始时间             | 必需                                 |\n| END_TIME   | 报名结束时间             | 必需                                 |\n| ADMIN_PASS | 用来登录后台的管理员密码 | 必需                                 |\n| PORT       | 项目监听端口             | 可选，默认为 4000                    |\n| CORS       | 跨域域名设置             | 可选，默认不允许跨域，且不能设为 `*` |\n\n## 2. 部署项目\n\n本项目可以通过编译成单个可执行文件，同时包含前端、后端和数据库，经优化编译后的可执行文件不到 **7M**！\n\n如果你想了解如何编译的话可以参考本项目的 [Dockerfile](Dockerfile)。\n\n理论上本项目是不需要 Docker 就可以启动的，但是使用 Docker 可以方便管理和部署。\n\n新建一个 docker-compose.yaml 文件，根据需要修改其中的环境变量：\n\n```yaml\nservices:\n  joinus:\n    image: mraddict063/stas-joinus\n    restart: unless-stopped\n    ports:\n      - 4000:4000\n    environment:\n      - START_TIME=2024-09-03T16:00:00.000Z\n      - END_TIME=2024-09-15T15:59:59.000Z\n      - ADMIN_PASS=password\n    volumes:\n      - ./data:/data\n```\n\n然后使用下面的命令启动项目即可：\n\n```sh\ndocker-compose up -d\n```\n\n默认情况下该项目会在 **4000** 端口启动，并在当前目录下创建一个 **data/data.db** 的数据库文件，你可以通过浏览器访问 `http://localhost:4000` 来查看项目。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-addict%2Fstas-joinus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmr-addict%2Fstas-joinus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmr-addict%2Fstas-joinus/lists"}