CMD Challenge

这个资源库是 https://gitlab.com/jarv/cmdchallenge 的镜像。包含 cmdchallenge.com 网站的代码。「This repo is mirror of https://gitlab.com/jarv/cmdchallenge. it contains the code for the site cmdchallenge.com」

  • 所有者: jarv/cmdchallenge
  • 平台: Docker, Linux, Mac, Windows
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

CMD Challenge

This repository contains the code for the site cmdchallenge.com

Read more about cmdchallenge

Installation

  • Install Docker
  • Install asdf
  • asdf install
  • docker pull registry.gitlab.com/jarv/cmdchallenge/cmd
  • docker pull registry.gitlab.com/jarv/cmdchallenge/cmd-no-bin

Testing

  • make test

Local development

Backend

Start the backend which will also initialize a new sqlite database in the cmdchallenge/ directory.

If you want to use the test in-memory database use the -dev flag.

make build-image-cmd # builds the docker images for the runner
go run cmdchallenge/cmd/serve.go

Test a single command:

curl  http://localhost:8181/c/r -X POST -F slug=hello_world -F cmd="echo hello world"

Fetch solutions:

curl http://localhost:8181/c/s?slug=hello_world

Frontend

Most of the logic is coded in src/cmdchallenge.js, to compile run:

npx webpack

To start the development webserver:

make serve

CI vars

The following CI vars are necessary to run the full pipeline

  • AWS_ACCESS_KEY_ID: Access key for AWS
  • AWS_SECRET_ACCESS_KEY: Secret key for AWS
  • STATE_S3_BUCKET: where to store Terraform state
  • STATE_S3_KEY: key for storing state
  • STATE_S3_REGION: region for deployment
  • SSH_PRIVATE_KEY: Private SSH key for the remote Docker machine
  • SSH_PUBLIC_KEY : Public SSH key for the remote Docker machine

Bugs / Suggestions

主要指標

概覽
名稱與所有者jarv/cmdchallenge
主編程語言Go
編程語言Makefile (語言數: 8)
平台Docker, Linux, Mac, Windows
許可證MIT License
所有者活动
創建於2017-01-16 20:40:46
推送於2023-11-27 21:21:02
最后一次提交2023-11-27 22:20:35
發布數0
用户参与
星數723
關注者數28
派生數72
提交數852
已啟用問題?
問題數131
打開的問題數32
拉請求數31
打開的拉請求數0
關閉的拉請求數5
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?