{"id":24914357,"url":"https://github.com/jansora/onlinecompiler","last_synced_at":"2025-10-17T00:31:58.322Z","repository":{"id":41276483,"uuid":"254028409","full_name":"Jansora/OnlineCompiler","owner":"Jansora","description":"支持在线运行(Demo)和分享的代码演练场(Playground), 基于React + Quarkus (Grallvm) 构建, 目前已支持Java, Golang, Python, Nodejs, Javascript等.","archived":false,"fork":false,"pushed_at":"2023-02-20T01:29:08.000Z","size":17750,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-06-01T07:47:59.429Z","etag":null,"topics":["docker","golang","grallvm","java","nodejs","python","quarkus"],"latest_commit_sha":null,"homepage":"https://onlinecompiler.jansora.app","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jansora.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-08T08:25:05.000Z","updated_at":"2023-06-01T05:58:00.000Z","dependencies_parsed_at":"2023-01-22T10:30:24.346Z","dependency_job_id":null,"html_url":"https://github.com/Jansora/OnlineCompiler","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jansora%2FOnlineCompiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jansora%2FOnlineCompiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jansora%2FOnlineCompiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jansora%2FOnlineCompiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jansora","download_url":"https://codeload.github.com/Jansora/OnlineCompiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236756750,"owners_count":19199902,"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","golang","grallvm","java","nodejs","python","quarkus"],"created_at":"2025-02-02T06:17:49.818Z","updated_at":"2025-10-17T00:31:52.874Z","avatar_url":"https://github.com/Jansora.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OnlineCompiler\n支持在线运行的代码演练场(Playground), 基于React + Quarkus (Grallvm) 构建, 目前已支持Java, Golang, Python, Nodejs, Javascript等.\n\n# 在线 demo\nhttps://onlinecompiler.github.jansora.com\n\n部署方案分为三种\n1. 物理机部署\n2. Docker 部署\n3. Kubernetes 部署\n# 物理机部署\n\u003e 需要自备 `java jdk 17`(jdk17+) `python3`(3.6+) `golang` `nodejs` (14+) 可执行环境\n\n\u003e 请通过 `java -version` `python3` `go version` `node -v` 验证运行环境\n\n\u003e 需要提供足够的权限来创建临时文件以及运行权限\n\n下载主分支代码\n1. 编译前端静态资源 `cd frontend \u0026\u0026 yarn build`  (需要 nodejs npm 环境支持)\n2. 拷贝前端静态资源到后端文件夹 `cp -r frontend/build/* quarkus/src/main/resources/META-INF/resources`\n3. 编译后端可执行文件 `cd quarkus \u0026\u0026 quarkus build --native` \n\u003e 编译 docker 镜像内可用的可执行文件请使用命令 `cd quarkus \u0026\u0026 quarkus build --native -Dquarkus.native.container-build=true -Dquarkus.native.container-runtime=docker`\n4. 执行 `./quarkus/target/onlinecompiler-1.0.0-SNAPSHOT-runner` 应用即可正常启动\n\n启动成功日志如下\n```bash\nroot@parallels-Parallels-Virtual-Platform:/data/Github/OnlineCompiler/quarkus/target# ./onlinecompiler-1.0.0-SNAPSHOT-runner \n__  ____  __  _____   ___  __ ____  ______ \n --/ __ \\/ / / / _ | / _ \\/ //_/ / / / __/ \n -/ /_/ / /_/ / __ |/ , _/ ,\u003c / /_/ /\\ \\   \n--\\___\\_\\____/_/ |_/_/|_/_/|_|\\____/___/   \n2022-11-20 22:18:26,451 INFO  [io.quarkus] (main) onlinecompiler 1.0.0-SNAPSHOT native (powered by Quarkus 2.14.0.Final) started in 1.008s. Listening on: http://0.0.0.0:8080\n2022-11-20 22:18:26,513 INFO  [io.quarkus] (main) Profile prod activated. \n2022-11-20 22:18:26,513 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]\n```\n\n访问 http://localhost:8080 即可正常使用\n\n# Docker 部署\n\n## 获取镜像\n1. 创建应用数据目录 `mkdir /app \u0026\u0026 cd /app`\n2. 拉取镜像 `docker pull ccr.ccs.tencentyun.com/jansora/onlinecompiler:7.2`\n\n## 部署到 docker\n启动镜像 `sudo docker run -d -p 9003:8080 --name onlinecompiler -v /app/data:/app/data ccr.ccs.tencentyun.com/jansora/onlinecompiler:7.2`\n\n\u003e /app/data 为临时数据存放, 去掉也无妨\n\n浏览器输入 localhost:9003 即可看到启动成功\n\n监测日志 `docker logs -f onlinecompiler`\n\n## kubernetes 部署\n\u003e kubernetes 1.19 版本\n参考 kubernetes 子目录\ndeployment -\u003e service -\u003e yaml 部署\n```\ngit clone https://github.com/Jansora/OnlineCompiler.git\ncd OnlineCompiler/kubernetes\n\n# 部署 deployment\n# 如果不需要存储 share 数据无需外挂 pvc\nkubectl -f onlinecompiler-deployment.yaml\n# 部署 service\nkubectl -f onlinecompiler-service.yaml\n\n# 部署网关\nkubectl -f nginx-ingress-controller.yaml\n\n# 部署网关配置\n# 需要调整域名配置以适配当前 k8s 集群\nkubectl -f github-ingress.yaml\n```\n\n\n\u003e 安装教程以linux下操作为准, 但windows也支持安装, windows用户请根据以上步骤自行搭建安装教程\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjansora%2Fonlinecompiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjansora%2Fonlinecompiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjansora%2Fonlinecompiler/lists"}