Files
neo-blog/Dockerfile
Snowykami 5fac42439a ️ feat: add post fetching by ID and improve blog home page
- Implemented `getPostById` API function to fetch a post by its ID.
- Refactored the main page to use a new `BlogHome` component for better organization.
- Added loading state and sorting functionality for posts on the blog home page.
- Integrated label fetching and display on the blog home page.
- Enhanced the blog card component with improved layout and statistics display.
- Updated the navbar to use dynamic configuration values.
- Added Docker support with a comprehensive build and push workflow.
- Created a custom hook `useStoredState` for managing local storage state.
- Added a new page for displaying individual posts with metadata generation.
- Removed unused components and files to streamline the codebase.
2025-07-25 03:58:53 +08:00

31 lines
406 B
Docker

# build
FROM golang:1.24.2-alpine3.21 AS builder
ENV TZ=Asia/Chongqing
WORKDIR /app
RUN apk --no-cache add build-base git tzdata
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o server ./cmd/server
# production
FROM alpine:latest AS prod
ENV TZ=Asia/Chongqing
WORKDIR /app
COPY --from=builder /app/server /app/server
EXPOSE 8888
RUN chmod +x ./server
ENTRYPOINT ["./server"]