Skip to content
Open
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
7 changes: 7 additions & 0 deletions property-tax/enumeration-backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.json
*.md
/migrations
.env
*.yaml
*.yml
.gitignore
57 changes: 57 additions & 0 deletions property-tax/enumeration-backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Environment files
.env
.env.local
.env.development
.env.test
.env.production

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool
*.out

# Go workspace file
go.work

# Dependency directories
vendor/

# IDE files
.vscode/
.idea/
*.swp
*.swo
*~

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Log files
*.log

# Temporary files
*.tmp
*.temp

# Database files
*.db
*.sqlite
*.sqlite3

# Build directories
build/
dist/
36 changes: 36 additions & 0 deletions property-tax/enumeration-backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Build stage
FROM golang:1.25-alpine AS builder

WORKDIR /app

# Copy go.mod and go.sum files
COPY go.mod go.sum ./

# Download dependencies
RUN go mod download

# Copy the source code
COPY . .

# Build the application (main.go is in cmd/server/)
RUN CGO_ENABLED=0 GOOS=linux go build -o property-enumeration-service ./cmd/server

# Final stage
FROM alpine:3.19

WORKDIR /app

# Install ca-certificates for HTTPS requests
RUN apk --no-cache add ca-certificates

# Copy the binary from the builder stage
COPY --from=builder /app/property-enumeration-service .

# Set permissions
RUN chmod +x /app/property-enumeration-service

# Expose port 8080 (default property service port)
EXPOSE 8080

# Set the entry point
ENTRYPOINT ["./property-enumeration-service"]
Loading