aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile21
-rw-r--r--README.md8
2 files changed, 28 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..37ff07c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,21 @@
+FROM frolvlad/alpine-glibc
+WORKDIR /usr/src/app
+
+RUN apk add nodejs npm git; \
+ npm install --global lix; \
+ lix install haxe 4.1.5 --global
+
+COPY res ./res
+COPY src ./src
+COPY user ./user
+COPY build-*.hxml .
+COPY package*.json .
+COPY default-config.json .
+
+RUN npm ci; \
+ haxelib install all --always; \
+ haxe build-all.hxml
+
+EXPOSE 4200
+
+CMD npm start
diff --git a/README.md b/README.md
index 389b065..c88409f 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,12 @@ Default channel example: http://synctube-example.herokuapp.com/
- Run `node build/server.js`
- Open showed "Local" link for yourself and send "Global" link to friends
+### Setup (Docker)
+- As alternative, you can install Docker and run:
+- `docker build -t synctube .`
+- `docker run --rm -it -p 4200:4200 -v ${PWD}/user:/usr/src/app/user synctube`
+- (Docker container hides real local/global ips, so you need to checkout it manually)
+
### Configuration
It's just works, but you can also check [user/ folder](/user/README.md) for server settings and additional customization.
@@ -50,7 +56,7 @@ It's just works, but you can also check [user/ folder](/user/README.md) for serv
### Development
- Install [Haxe 4.1](https://haxe.org/download/), [VSCode](https://code.visualstudio.com) and [Haxe extension](https://marketplace.visualstudio.com/items?itemName=nadako.vshaxe)
- `haxelib install all` to install extern libs
-- If you skipped `Setup` section before: `npm install`
+- If you skipped `Setup` section before: `npm ci`
- Open project in VSCode and press `F5` for client+server build and run
### About
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage