Add initial project structure with backend and frontend setup
- Created backend structure with Go, including main application logic and API endpoints. - Added Docker support for both development and production environments. - Introduced frontend using Nuxt 3 with Tailwind CSS for styling. - Included configuration files for Docker and environment variables. - Established basic documentation for contributing, development, and deployment processes. - Set up .gitignore and .dockerignore files to manage ignored files in the repository.
This commit is contained in:
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
||||
FROM golang:1.21-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"]
|
||||
Reference in New Issue
Block a user