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
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,13 @@ services:
environment:
- PORT=8085
- DATABASE_URL=postgres://auron:auron_pass@products-db:5432/products_db?sslmode=disable
- REDIS_URL=redis://redis:6379/0
- KAFKA_BROKERS=kafka:29092
depends_on:
products-db:
condition: service_healthy
kafka:
condition: service_healthy
networks:
- auron-network
restart: unless-stopped
Expand Down
6 changes: 6 additions & 0 deletions services/inventory-service/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Inventory Service
PORT=8085
DATABASE_URL=postgres://auron:auron_pass@localhost:5433/products_db?sslmode=disable
REDIS_URL=redis://localhost:6379/0
KAFKA_BROKERS=localhost:9092
GORM_LOG_LEVEL=warn
23 changes: 23 additions & 0 deletions services/inventory-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM golang:1.25-alpine AS builder

WORKDIR /app

RUN apk add --no-cache git

COPY go.mod go.sum ./

COPY . .

RUN CGO_ENABLED=0 GOOS=linux go build -o /inventory-service .

FROM alpine:3.18

RUN apk add --no-cache ca-certificates curl

WORKDIR /app

COPY --from=builder /inventory-service .

EXPOSE 8085

CMD ["./inventory-service"]
Loading
Loading