Feat: add dockerfile
This commit is contained in:
		
							
								
								
									
										20
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| # Build stage | ||||
| FROM golang:1.24-alpine AS builder | ||||
| WORKDIR /src | ||||
| RUN apk add --no-cache build-base gcc | ||||
| COPY go.mod go.sum ./ | ||||
| RUN go mod download | ||||
| COPY . . | ||||
| RUN CGO_ENABLED=1 GOOS=linux go build -a -o /gralias . | ||||
|  | ||||
| # Final stage | ||||
| FROM alpine:latest | ||||
| WORKDIR /app | ||||
| COPY --from=builder /gralias /app/gralias | ||||
| # copy assets and templates | ||||
| COPY assets ./assets | ||||
| COPY components ./components | ||||
| COPY config.example.toml ./config.toml | ||||
| COPY migrations ./migrations | ||||
| EXPOSE 3000 | ||||
| CMD ["/app/gralias"] | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder