mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(server): initialize project skeleton with db and api setup
Establish the foundational structure for the ez-api server. Key changes include: - Set up main entry point with graceful shutdown and Gin router - Configure database connections for PostgreSQL (GORM) and Redis - Define core data models (User, Provider, Key, Model) - Implement configuration loading and basic key creation handler - Add Dockerfile for multi-stage builds and .gitignore
This commit is contained in:
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM golang:1.24-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go build -o ez-api ./cmd/server
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/ez-api .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["./ez-api"]
|
||||
Reference in New Issue
Block a user