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: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,15 @@ services:
environment:
- PORT=8084
- DATABASE_URL=postgres://auron:auron_pass@payments-db:5432/payments_db?sslmode=disable
- REDIS_URL=redis://redis:6379/0
- KAFKA_BROKERS=kafka:29092
- STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
depends_on:
payments-db:
condition: service_healthy
kafka:
condition: service_healthy
networks:
- auron-network
restart: unless-stopped
Expand Down Expand Up @@ -289,6 +295,8 @@ services:
volumes:
- zookeeper_data:/var/lib/zookeeper/data
- zookeeper_log:/var/lib/zookeeper/log
networks:
- auron-network
healthcheck:
test: nc -z localhost 2181 || exit -1
interval: 10s
Expand All @@ -312,6 +320,8 @@ services:
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
volumes:
- kafka_data:/var/lib/kafka/data
networks:
- auron-network
healthcheck:
test:
[
Expand All @@ -332,6 +342,8 @@ services:
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092
networks:
- auron-network

# ============================================================
# CACHE
Expand Down
8 changes: 8 additions & 0 deletions services/payment-service/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Payment Service
PORT=8084
DATABASE_URL=postgres://auron:auron_pass@localhost:5435/payments_db?sslmode=disable
REDIS_URL=redis://localhost:6379/0
KAFKA_BROKERS=localhost:9092
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
GORM_LOG_LEVEL=warn
23 changes: 23 additions & 0 deletions services/payment-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 /payment-service .

FROM alpine:3.18

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

WORKDIR /app

COPY --from=builder /payment-service .

EXPOSE 8084

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