diff --git a/.gitignore b/.gitignore index 4f486fc..bc5988d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /config.toml +/compose.yml /highscore-server /db diff --git a/compose.example.yml b/compose.example.yml new file mode 100644 index 0000000..f524485 --- /dev/null +++ b/compose.example.yml @@ -0,0 +1,15 @@ +services: + highscore-server: + build: + context: . + dockerfile: Dockerfile + image: git.snrd.eu/sunred/highscore-server:latest + container_name: highscore-server + network_mode: bridge + volumes: + - ./config.toml:/app/config.toml:ro + - ./db:/app/db:rw + ports: + - "127.0.0.1:8080:8080/tcp" + - "[::1]:8080:8080/tcp" + restart: unless-stopped diff --git a/docker.bake.hcl b/docker.bake.hcl new file mode 100644 index 0000000..9c2acab --- /dev/null +++ b/docker.bake.hcl @@ -0,0 +1,17 @@ +variable "REG" { + default = "git.snrd.eu" +} +variable "REPO" { + default = "sunred/higscore-server" +} +variable "TAG" { + default = "latest" +} + +group "default" { + targets = ["production"] +} +target "production" { + output = ["type=docker"] + tags = ["${REG}/${REPO}:latest", "${REG}/${REPO}:${TAG}"] +}