aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ashby <martin@martin-laptop.lan>2018-05-19 11:33:21 +0100
committerMartin Ashby <martin@martin-laptop.lan>2018-05-19 11:33:21 +0100
commit445de8359766b4fe04750335dbadec21312bc4c6 (patch)
treefdbc14dcb179abd9984a90a362e57285295e3428
parentfd941a660c7758949f292a89310a4a270dc5cc63 (diff)
parent16eae485812b34fed96eeac39f082bfcb7750d7e (diff)
downloadunicornpaint-445de8359766b4fe04750335dbadec21312bc4c6.tar.gz
unicornpaint-445de8359766b4fe04750335dbadec21312bc4c6.tar.bz2
unicornpaint-445de8359766b4fe04750335dbadec21312bc4c6.tar.xz
unicornpaint-445de8359766b4fe04750335dbadec21312bc4c6.zip
Merge branch 'master' of github.com:MFAshby/unicornpaint
-rw-r--r--.dockerignore1
-rw-r--r--Dockerfile14
-rw-r--r--README.md10
-rw-r--r--Screenshot.pngbin0 -> 288585 bytes
-rw-r--r--docker-compose.yml2
5 files changed, 14 insertions, 13 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/README.md b/README.md
index ee585f9..661588d 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,11 @@
A pretty basic painting app for the Raspberry Pi Unicorn HD hat.
Allows multiple people to paint at once & updates in real time.
-To run:
-`curl "https://raw.githubusercontent.com/MFAshby/unicornpaint/master/download_and_run.sh" | sh`
-Open your browser to http://<your raspberry IP address>:3001/
-
-Alternatively, run with docker:
+Run with docker:
```
docker pull mfashby/unicornpaint
docker run --device /dev/spidev0.0:/dev/spidev0.0 --publish 3001:3001 mfashby/unicornpaint
```
-Or use the example docker-compose.yml file \ No newline at end of file
+Or clone the repository and use the example docker-compose.yml file to build & run
+
+![alt text](https://github.com/MFAshby/unicornpaint/raw/master/Screenshot.png "Screenshot")
diff --git a/Screenshot.png b/Screenshot.png
new file mode 100644
index 0000000..5c916f9
--- /dev/null
+++ b/Screenshot.png
Binary files differ
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