mirror of
https://git.robbyzambito.me/bluesky-nats-proxy/
synced 2025-12-21 16:54:48 +00:00
Compare commits
2 Commits
55f0a026cb
...
bcd56644b9
| Author | SHA1 | Date | |
|---|---|---|---|
| bcd56644b9 | |||
| e9c425b258 |
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
FROM golang:1.24
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN go build -v -o /usr/local/bin/app ./...
|
||||||
|
|
||||||
|
CMD ["app"]
|
||||||
2
main.go
2
main.go
@@ -65,6 +65,8 @@ func main() {
|
|||||||
opts = append(opts, nats.UserCredentials(natsCredsFile))
|
opts = append(opts, nats.UserCredentials(natsCredsFile))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts = append(opts, nats.Name("Bluesky Proxy"))
|
||||||
|
|
||||||
nc, err := nats.Connect(natsURL, opts...)
|
nc, err := nats.Connect(natsURL, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Error connecting to NATS:", err)
|
log.Fatal("Error connecting to NATS:", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user