From 319499850338d32568b6e4e7a78c9da5e9056603 Mon Sep 17 00:00:00 2001 From: raul Date: Mon, 10 Jun 2024 12:43:26 +0200 Subject: [PATCH] Dockerize application --- Dockerfile | 11 +++++++++++ docker-compose.yml | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6b1f22f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM golang:1.22-alpine + +RUN mkdir /app + +ADD . /app + +WORKDIR /app + +RUN go build -o main . + +CMD ["/app/main", "server"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0d02e67 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: '3' + +networks: + tiamat: + driver: bridge + +services: + tiamat: + container_name: "tiamat" + #image: "tiamat" + build: + context: . + dockerfile: "Dockerfile" + ports: + - 8080:8080 + - 1302:1302 + networks: + - tiamat + volumes: + - ./sample-config/:/root/.config/tiamat/