This repository contains the code for the site cmdchallenge.com
- Install Docker
- Install
asdf
asdf install
docker pull registry.gitlab.com/jarv/cmdchallenge/cmd
docker pull registry.gitlab.com/jarv/cmdchallenge/cmd-no-bin
make test
Start the backend the -dev
option uses an in-memory db. Without it, an sqlite db will be created cmdchallenge/db.sql
.
Backend:
make build # builds the docker images for the runner
cd cmdchallenge
go run cmd/serve/serve.go -dev
Frontend:
cd site
npx vite
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
The following CI vars are necessary to run the full pipeline
AWS_ACCESS_KEY_ID
: Access key for AWSAWS_SECRET_ACCESS_KEY
: Secret key for AWSSTATE_S3_BUCKET
: where to store Terraform stateSTATE_S3_KEY
: key for storing stateSTATE_S3_REGION
: region for deploymentSSH_PRIVATE_KEY
: Private SSH key for the remote Docker machineSSH_PUBLIC_KEY
: Public SSH key for the remote Docker machine
- Open a GitLab issue.