From 516c91ab3fd44062071b0786bc2d8e92b10eb214 Mon Sep 17 00:00:00 2001 From: a Date: Wed, 13 Jul 2022 17:59:38 -0500 Subject: [PATCH] docker --- Dockerfile | 19 ++++++++++++++ src/components/CharacterRoulette.vue | 3 ++- src/lib/columns/column_impl.ts | 2 +- src/lib/storage.ts | 9 ++++++- src/lib/table.ts | 2 +- src/lib/trickster.ts | 37 ++++++++++++++++++++++++++-- src/state/state.ts | 7 ++++-- 7 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..42f310e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM golang:1.18.2-alpine as GOBUILDER +WORKDIR /wd +COPY go.mod go.sum ./ +COPY app ./app +RUN go mod tidy +RUN go build -o app.exe ./app + +FROM node:18.1-alpine as NODEBUILDER +WORKDIR /wd +COPY . . +RUN npm install +RUN npx vite build + +FROM alpine:3.16 +WORKDIR /wd +COPY --from=GOBUILDER /wd/app.exe app.exe +COPY --from=NODEBUILDER /wd/dist dist +ENTRYPOINT [ "/wd/app.exe" ] + diff --git a/src/components/CharacterRoulette.vue b/src/components/CharacterRoulette.vue index 8e48063..7b57d01 100644 --- a/src/components/CharacterRoulette.vue +++ b/src/components/CharacterRoulette.vue @@ -7,7 +7,7 @@