Fix: Docker unify all the builds (air and production) within tmp/

This commit is contained in:
Óscar M. Lage 2024-11-28 23:02:41 +01:00
parent 0be66aab74
commit a52a8393a1
5 changed files with 9 additions and 10 deletions

View File

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

View File

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

3
.gitignore vendored
View File

@ -1,4 +1,3 @@
data
.env
tmp_bot
tmp_web
tmp

View File

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

View File

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