Merge pull request #66 from TeDomum/master
Deploy the app in the proper dir for dependency management
This commit is contained in:
commit
6c2bd8031a
23
Dockerfile
23
Dockerfile
|
@ -1,25 +1,24 @@
|
||||||
|
# Build image
|
||||||
FROM golang:1.11.2-alpine3.8 as build
|
FROM golang:1.11.2-alpine3.8 as build
|
||||||
|
|
||||||
RUN apk add --update nodejs nodejs-npm make g++ git sqlite-dev
|
RUN apk add --update nodejs nodejs-npm make g++ git sqlite-dev
|
||||||
RUN npm install -g less
|
RUN npm install -g less less-plugin-clean-css
|
||||||
RUN npm install -g less-plugin-clean-css
|
|
||||||
|
|
||||||
WORKDIR /go/src/app
|
RUN mkdir -p /go/src/github.com/writeas/writefreely
|
||||||
|
WORKDIR /go/src/github.com/writeas/writefreely
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN make assets
|
RUN make build \
|
||||||
RUN make install
|
&& make ui
|
||||||
RUN make ui
|
|
||||||
RUN make deps
|
|
||||||
|
|
||||||
RUN mkdir /stage && \
|
RUN mkdir /stage && \
|
||||||
cp -R /go/bin \
|
cp -R /go/bin \
|
||||||
/go/src/app/templates \
|
/go/src/github.com/writeas/writefreely/templates \
|
||||||
/go/src/app/static \
|
/go/src/github.com/writeas/writefreely/static \
|
||||||
/go/src/app/pages \
|
/go/src/github.com/writeas/writefreely/pages \
|
||||||
/go/src/app/keys \
|
/go/src/github.com/writeas/writefreely/keys \
|
||||||
/stage
|
/stage
|
||||||
|
|
||||||
|
# Final image
|
||||||
FROM alpine:3.8
|
FROM alpine:3.8
|
||||||
|
|
||||||
RUN apk add --no-cache openssl ca-certificates
|
RUN apk add --no-cache openssl ca-certificates
|
||||||
|
|
Loading…
Reference in New Issue