-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.env.* | ||
ui/.env.* | ||
ui/dist | ||
ui/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM node:20-alpine AS build-ui | ||
WORKDIR /app | ||
COPY ui/package.json ui/package-lock.json ./ | ||
RUN npm install | ||
ENV NODE_ENV=production | ||
COPY ui/ . | ||
RUN npm run build | ||
|
||
# Build the Go binary, including embedded UI files: | ||
FROM golang:1.22.2-alpine AS build-go | ||
WORKDIR /go/src/riverui | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
# Copy Go files without copying the ui dir: | ||
COPY *.go ./ | ||
COPY internal/ internal/ | ||
RUN ls -la | ||
COPY ui/*.go ./ui/ | ||
COPY --from=build-ui /app/dist ./ui/dist | ||
|
||
RUN go build -o /bin/riverui . | ||
|
||
FROM alpine:3.19.1 | ||
COPY --from=build-go /bin/riverui /bin/riverui | ||
CMD ["/bin/riverui"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters