From 942715c47f668900dba96dcb7fb2526396849cf5 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Wed, 7 Jul 2021 01:03:18 +0200 Subject: [PATCH] Update Dockerfile to follow new directory architecture --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d75a10..e142512 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,11 @@ WORKDIR /go/src/git.happydns.org/happydns RUN apk --no-cache add python2 build-base -COPY htdocs/ htdocs/ +COPY ui/ ui/ RUN yarn config set network-timeout 100000 -RUN yarn --cwd htdocs install -RUN yarn --cwd htdocs --offline build +RUN yarn --cwd ui install +RUN yarn --cwd ui --offline build FROM golang:alpine as gobuild @@ -24,14 +24,15 @@ COPY api ./api COPY config ./config COPY forms ./forms COPY generators ./generators +COPY internal ./internal COPY model ./model COPY providers ./providers COPY services ./services COPY storage ./storage COPY utils ./utils -COPY generate.go go.mod go.sum main.go static.go ./ +COPY generate.go go.mod go.sum main.go ./ -RUN sed -i '/yarn --cwd htdocs --offline build/d' static.go && \ +RUN sed -i '/yarn --offline build/d' ui/assets.go && \ go get -d -v && \ go generate -v && \ go build -v -ldflags '-w'