aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile26
1 files changed, 19 insertions, 7 deletions
diff --git a/Dockerfile b/Dockerfile
index 156e3f8..2d65ee5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,21 @@
FROM golang:alpine
-RUN apk update && apk add git
-RUN go get github.com/ecc1/spi
-RUN go get github.com/gorilla/websocket
-RUN go get github.com/MFAshby/unicornpaint/unicorn
-COPY build/ build/
-COPY Server.go ./
-RUN go build -o ./unicornpaint Server.go
+# Add tools for downloading & building
+RUN apk add --update git nodejs nodejs-npm
+
+# Copy everything across
+COPY . ./
+
+# Build the website
+RUN npm install && npm run-script build
+
+# Retrieve server dependencies
+RUN go get github.com/ecc1/spi github.com/gorilla/websocket github.com/MFAshby/unicornpaint/unicorn
+
+# Build server
+RUN go build -o ./unicornpaint Server2.go
+
+# Get rid of stuff we don't need for runtime
+RUN apk del git nodejs nodejs-npm
+
+# Run server!
CMD ./unicornpaint