A website for the sudoku solver.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Martins Eglitis 40556165a8 Update go mod using semvers, since sudoku solver has switched to semversioning, it is a good idea to update this project as well. Update minor data structure bug in main.js. 1 month ago
assets Update readme 2 months ago
logs Implement some logging 3 months ago
web Update go mod using semvers, since sudoku solver has switched to semversioning, it is a good idea to update this project as well. Update minor data structure bug in main.js. 1 month ago
.gitignore Update Gitlab pipelines, now with 6 stages, formating, testing, building and deploying docker images are done 2 months ago
.gitlab-ci.yml Update comments 2 months ago
Dockerfile Update comments 2 months ago
LICENSE Initial commit 3 months ago
README.md Update README.md 2 months ago
docker-push.sh Update docker push script. 2 months ago
go.mod Update go mod using semvers, since sudoku solver has switched to semversioning, it is a good idea to update this project as well. Update minor data structure bug in main.js. 1 month ago
go.sum Update go mod using semvers, since sudoku solver has switched to semversioning, it is a good idea to update this project as well. Update minor data structure bug in main.js. 1 month ago
main.go Optimize and handle test cases for the HandleInput func 2 months ago
main_test.go Test HandleInput func 2 months ago

README.md

sudoku-website

A website for the sudoku solver. It comes with a minimal, elegant, and responsive (bootstrap based) UI, where the user can solve the sudoku, clear the grid, or download all solutions as a JSON file.

It also displays the error, e.g. an existing number, and a hostname, which is useful in scaled setups, e.g. seeing on which node the code runs.

Sudoku solver website

Running

Docker

The easiest way is via docker:

docker run -p 80:80 sitilge/sudoku:latest

You can also run build the image yourself from the Dockerfile. The image size is kept to minimum, thanks to Docker multi-stage builds.

Go

Alternatively, you can run it locally:

go get -v && go build main.go && sudo ./main

Access the website at http://localhost:80.

CI/CD

A GitLab CI/CD has been configured with 6 stages for automatic formatting, testing, building, handling the docker image, and deploying on staging and production environments on AWS EKS. You have to have the underlying AWS EKS infrastructure (see the related project: https://git.sitilge.id.lv/sitilge/sudoku-devops) in place. Then set up the following values in GitLab CI/CD variables section:

  • CI_REGISTRY_USER - Docker Hub username.
  • CI_REGISTRY_PASSWORD - Docker Hub access token or password (not recommended).
  • AWS_ACCESS_KEY_ID - AWS IAM user access key ID.
  • AWS_SECRET_ACCESS_KEY - AWS IAM user access key secret.
  • AWS_DEFAULT_REGION - AWS default region.
  • AWS_CLUSTER_NAME - the name of the EKS cluster.

Finally, rerun the GitLab CI/CD pipeline and access the DNS of the load balancer.