Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ RUN go mod download

COPY . .

RUN go build -v -o pulsebridge .
RUN go build -v -o pulse-bridge .

FROM alpine:latest AS runner

ENV GO_ENV=production

WORKDIR /app

COPY --from=builder /app/pulsebridge .
COPY --from=builder /app/pulse-bridge .

COPY --from=builder /app/config.yml ./config.yml

RUN mkdir -p /etc/pulsebridge && \
cp ./config.yml /etc/pulsebridge/config.yml && \
chmod +x ./pulsebridge
RUN mkdir -p /etc/pulse-bridge && \
cp ./config.yml /etc/pulse-bridge/config.yml && \
chmod +x ./pulse-bridge

EXPOSE 8080

ENTRYPOINT ["./pulsebridge"]
ENTRYPOINT ["./pulse-bridge"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dev:

docker:
@docker compose down -v
@docker rmi pulsebridge -f || true
@docker rmi pulse-bridge -f || true
@docker compose up -d
@echo "Docker image built and containers started."

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ go run .
### 🐳 Deploy with Docker

```bash
docker pull ghcr.io/wavezync/pulsebridge:latest
docker run -d -p 8080:8080 ghcr.io/wavezync/pulsebridge:latest
docker pull ghcr.io/wavezync/pulse-bridge:latest
docker run -d -p 8080:8080 ghcr.io/wavezync/pulse-bridge:latest
```

Update the [config.yml](https://github.com/wavezync/pulse-bridge/blob/main/config.yml) in the project root to add your services and databases. Then rebuild the binary or Docker image and run it.
Expand Down Expand Up @@ -110,7 +110,7 @@ PORT=8080 # Defaults to 8080
2. CLI arguments:

```bash
pb --config=mycustomconfig.yml --port=8080 --host=0.0.0.0
pulse-bridge --config=mycustomconfig.yml --port=8080 --host=0.0.0.0
```

> **Note:** CLI arguments take priority over `.env` file settings.
Expand Down
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ var (
)

var rootCmd = &cobra.Command{
Use: "pulsebridge",
Short: "pulsebridge is a powerful uptime monitoring tool",
Long: `pulsebridge exposes internal service status via HTTP, enabling seamless integration with external monitoring tools like Atlassian Statuspage.`,
Use: "pulse-bridge",
Short: "pulse-bridge is a powerful uptime monitoring tool",
Long: `pulse-bridge exposes internal service status via HTTP, enabling seamless integration with external monitoring tools like Atlassian Statuspage.`,
RunE: func(cmd *cobra.Command, args []string) error {
versionFlag, _ := cmd.Flags().GetBool("version")
if versionFlag {
Expand Down
24 changes: 12 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
services:
pulsebridge:
pulse-bridge:
build:
context: .
dockerfile: Dockerfile
container_name: pulsebridge
container_name: pulse-bridge
restart: unless-stopped
ports:
- "8080:8080"
Expand All @@ -13,16 +13,16 @@ services:
volumes:
- ./config.yml:/app/config.yml:ro
networks:
- pulsebridge-network
- pulse-bridge-network

helloworld-http:
image: testcontainers/helloworld:latest
container_name: helloworld-http
ports:
- "8081:8080"
networks:
- pulsebridge-network
- pulse-bridge-network

postgres-db:
image: postgres:latest
container_name: postgres-db
Expand All @@ -36,7 +36,7 @@ services:
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- pulsebridge-network
- pulse-bridge-network

redis-db:
image: redis:latest
Expand All @@ -51,7 +51,7 @@ services:
volumes:
- redis-data:/data
networks:
- pulsebridge-network
- pulse-bridge-network

mysql-db:
image: mysql:latest
Expand All @@ -65,8 +65,8 @@ services:
volumes:
- mysql-data:/var/lib/mysql
networks:
- pulsebridge-network
- pulse-bridge-network

mariadb-db:
image: mariadb:latest
container_name: mariadb-db
Expand All @@ -79,7 +79,7 @@ services:
volumes:
- mariadb-data:/var/lib/mysql
networks:
- pulsebridge-network
- pulse-bridge-network

mssql-db:
image: mcr.microsoft.com/mssql/server:2019-latest
Expand All @@ -93,10 +93,10 @@ services:
volumes:
- mssql-data:/var/opt/mssql
networks:
- pulsebridge-network
- pulse-bridge-network

networks:
pulsebridge-network:
pulse-bridge-network:
driver: bridge

volumes:
Expand Down
3 changes: 1 addition & 2 deletions internal/config/config_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package config

import (
"encoding/json"
"fmt"
"wavezync/pulse-bridge/internal/env"

"github.com/rs/zerolog/log"
Expand Down Expand Up @@ -30,7 +29,7 @@ func Init(configPath string, envConfig *env.Config) (*Config, error) {
if err != nil {
log.Error().Err(err).Msg("Failed to marshal config")
} else {
fmt.Println(string(prettyJSON))
log.Info().RawJSON("config", prettyJSON).Msg("Loaded config")
}

if err := v.Unmarshal(&config); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func getCommit(info *debug.BuildInfo) string {
return ""
}

// GetVersion returns the version of pulsebridge. This should be injected at build time
// GetVersion returns the version of pulse-bridge. This should be injected at build time
// using: -ldflags="-X 'wavezync/pulse-bridge/internal/version.version=vX.X.X'".
// If not provided, it will attempt to derive a version from VCS info.
func GetVersion() string {
Expand Down