forked from saas-templates/go-svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add dockerfile, rename frontend to ui
- Loading branch information
Showing
21 changed files
with
29 additions
and
5 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,24 @@ | ||
# Build FrontEnd | ||
FROM node:16 as fe-builder | ||
RUN apt update -y && apt install -y golang && npm install -g vite | ||
RUN mkdir /build | ||
ADD ./ui /build/ui | ||
WORKDIR /build/ui | ||
RUN yarn && yarn build | ||
|
||
# Build BackEnd | ||
FROM golang:1.19-alpine3.16 as builder | ||
RUN apk add --no-cache make | ||
RUN mkdir /build | ||
ADD ./ /build/ | ||
RUN rm -rf /build/ui | ||
COPY --from=fe-builder /build/ui /build/ui | ||
WORKDIR /build | ||
RUN make be | ||
|
||
# Package Staage | ||
FROM alpine:3.11.3 | ||
COPY --from=builder /build/dist/go-svelte /app/go-svelte | ||
COPY --from=builder /build/config.yml /app/config.yml | ||
CMD [ "/app/go-svelte", "serve", "-c", "/app/config.yml" ] | ||
|
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package frontend | ||
package ui | ||
|
||
import ( | ||
"embed" | ||
|
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.