- Introduced .editorconfig for consistent coding styles across the project. - Added .golangci.yml for Go linting configuration. - Updated AGENTS.md to clarify project structure and components. - Enhanced CONTRIBUTING.md with Makefile usage for common tasks. - Updated Dockerfiles to use Go 1.24 and improved build instructions. - Refined README.md and deployment documentation for clarity. - Added testing documentation in testing.md for backend and frontend tests. - Introduced Makefile for streamlined development commands and tasks.
32 lines
579 B
Docker
32 lines
579 B
Docker
FROM golang:1.24-alpine AS gobuilder
|
|
|
|
RUN mkdir /hnh-map
|
|
WORKDIR /hnh-map
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN go build -o hnh-map ./cmd/hnh-map
|
|
|
|
FROM node:20-alpine AS frontendbuilder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY frontend-nuxt/package.json frontend-nuxt/package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY frontend-nuxt/ ./
|
|
RUN npm run generate
|
|
|
|
FROM alpine
|
|
|
|
RUN mkdir /hnh-map
|
|
WORKDIR /hnh-map
|
|
|
|
COPY --from=gobuilder /hnh-map/hnh-map ./
|
|
COPY --from=frontendbuilder /app/.output/public ./frontend
|
|
|
|
EXPOSE 8080
|
|
CMD ["/hnh-map/hnh-map", "-grids=/map"]
|