aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dockerignore1
-rw-r--r--Dockerfile14
-rw-r--r--docker-compose.yml2
3 files changed, 10 insertions, 7 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+node_modules
diff --git a/Dockerfile b/Dockerfile
index a6fed73..fdb4794 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,8 @@
-FROM python:latest
-RUN pip install unicornhathd Flask Flask-Sockets
-RUN pip install numpy
-COPY build/ /build/
-COPY server.py /
-ENTRYPOINT python server.py
+FROM golang:alpine
+RUN apk update && apk add git
+RUN go get github.com/ecc1/spi
+RUN go get github.com/gorilla/websocket
+COPY build/ build/
+COPY Server.go Unicorn.go RealUnicorn.go ./
+RUN go build -o ./unicornpaint Server.go Unicorn.go RealUnicorn.go
+CMD ./unicornpaint
diff --git a/docker-compose.yml b/docker-compose.yml
index ebeb531..63058c2 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -6,7 +6,7 @@ services:
ports:
- "3001:3001"
volumes:
- - "/home/pi/docker/unicornpaint/saves/:/saves/"
+ - "/home/pi/docker/unicornpaint/saves/:/go/saves/"
devices:
- "/dev/spidev0.0:/dev/spidev0.0"
restart: always