From a52a8393a17538f8633c28abb0af0c97ccb16dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=CC=81scar=20M=2E=20Lage?= Date: Thu, 28 Nov 2024 23:02:41 +0100 Subject: [PATCH] Fix: Docker unify all the builds (air and production) within tmp/ --- .air.bot.toml | 6 +++--- .air.web.toml | 6 +++--- .gitignore | 3 +-- Dockerfile.bot | 2 +- Dockerfile.web | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.air.bot.toml b/.air.bot.toml index d3cd58f..22aa5dd 100644 --- a/.air.bot.toml +++ b/.air.bot.toml @@ -1,8 +1,8 @@ root = "." -tmp_dir = "tmp_bot" +tmp_dir = "tmp" [build] - cmd = "go build -o ./tmp_bot/main ./cmd/bot/main.go" - bin = "./tmp_bot/main" + cmd = "go build -o ./tmp/main_bot ./cmd/bot/main.go" + bin = "./tmp/main_bot" delay = 1000 diff --git a/.air.web.toml b/.air.web.toml index 0438733..92ad2f1 100644 --- a/.air.web.toml +++ b/.air.web.toml @@ -1,8 +1,8 @@ root = "." -tmp_dir = "tmp_web" +tmp_dir = "tmp" [build] - cmd = "go build -o ./tmp_web/main ./cmd/web/main.go" - bin = "./tmp_web/main" + cmd = "go build -o ./tmp/main_web ./cmd/web/main.go" + bin = "./tmp/main_web" delay = 1000 diff --git a/.gitignore b/.gitignore index 5bb379a..b85d901 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ data .env -tmp_bot -tmp_web +tmp diff --git a/Dockerfile.bot b/Dockerfile.bot index 7775aa2..790b8e9 100644 --- a/Dockerfile.bot +++ b/Dockerfile.bot @@ -24,5 +24,5 @@ CMD if [ "$DOCKER_ENV" = "local" ]; then \ air -c .air.bot.toml; \ else \ echo "Production environment detected, building and running bot..."; \ - go build -o bot ./cmd/bot/main.go && ./bot; \ + go build -o tmp/bot ./cmd/bot/main.go && ./tmp/bot; \ fi diff --git a/Dockerfile.web b/Dockerfile.web index 9e87a66..74c4680 100644 --- a/Dockerfile.web +++ b/Dockerfile.web @@ -24,5 +24,5 @@ CMD if [ "$DOCKER_ENV" = "local" ]; then \ air -c .air.web.toml; \ else \ echo "Production environment detected, building and running web..."; \ - go build -o web ./cmd/web/main.go && ./web; \ + go build -o tmp/web ./cmd/web/main.go && ./tmp/web; \ fi