Add compose and bake.hcl

This commit is contained in:
Manuel 2023-01-09 22:00:00 +01:00
parent ba7938dcf4
commit c03f949344
Signed by: Manuel
GPG key ID: 4085037435E1F07A
3 changed files with 33 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/config.toml
/compose.yml
/highscore-server
/db

15
compose.example.yml Normal file
View file

@ -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

17
docker.bake.hcl Normal file
View file

@ -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}"]
}