I want to host a little go backend program on my unraid server so I can receive HTTP requests from my contact form on my website and forward them using a Telegram bot.
But I have trouble getting the docker-compose configuration right.
My unraid server's IP Is 10.14.12.111 and I want the docker image to be on 10.14.12.85 on the "br0" network
services:
app:
build: .
ports:
- "8080:8080"
environment:
- TELEGRAM_BOT_TOKEN=my_telegram_bot_token
- TELEGRAM_CHAT_ID=my_chat_id
- SERVER_HOST=10.14.12.85
I've also tried to set the network to "br0" in the compose file with no success.
My Dockerfile:
FROM golang:1.22-alpine
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o main .
ENV TELEGRAM_BOT_TOKEN=my_telegram_bot_token
ENV TELEGRAM_CHAT_ID=my_chat_id
ENV SERVER_HOST=10.14.12.85
CMD ["./main"]
I'm using the Docker Compose Manager plugin by the way if this is relevant.