add .dockerignore, add Dockerfile, add default.nix, udpate README.md, move packages into respective category(dev/production)
This commit is contained in:
2
.dockerignore
Normal file
2
.dockerignore
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules
|
||||
yarn-error.log
|
||||
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM node:lts-alpine3.12
|
||||
RUN mkdir /data
|
||||
COPY ./ /data
|
||||
WORKDIR /data
|
||||
RUN ls -lash
|
||||
RUN yarn install --production
|
||||
RUN adduser --disabled-password --gecos "" slowdowner
|
||||
RUN chown slowdowner:slowdowner /data
|
||||
CMD yarn run start
|
||||
EXPOSE 8080
|
||||
21
README.md
21
README.md
@@ -1,13 +1,32 @@
|
||||
# SlowDowner
|
||||
music web player with slowdown option
|
||||
|
||||
## System Dependendies
|
||||
### Ubuntu/Debian (apt)
|
||||
TODO
|
||||
|
||||
### NixOS
|
||||
If you have the nix package manager or are running NixOS you can install all dependencies with
|
||||
``` nix-shell ```
|
||||
(This will try to start zsh in the end. Comment the line out if you use bash)
|
||||
|
||||
## Dependencies
|
||||
### Yarn
|
||||
This project uses Yarn as package manager, to install all needed dependencies run
|
||||
``` yarn ```
|
||||
``` yarn install ```
|
||||
in the project directory
|
||||
|
||||
### Building
|
||||
To build the static files run
|
||||
```yarn run build```
|
||||
this will create the folder ```dist``` with all static files.
|
||||
then you can run
|
||||
```yarn run start```
|
||||
to run the server locally
|
||||
or use the provided Dockerfile to create a dockerimage like this
|
||||
```docker build -t slowdowner:v3```
|
||||
for example
|
||||
|
||||
### Development
|
||||
to run the test server locally run
|
||||
``` yarn run start ```
|
||||
|
||||
21
default.nix
Normal file
21
default.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
with import <nixpkgs> {};
|
||||
with pkgs.yarn;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "yarn";
|
||||
buildInputs = [
|
||||
nodejs-10_x
|
||||
(yarn.override { nodejs = nodejs-10_x; })
|
||||
mozjpeg
|
||||
optipng
|
||||
autoconf
|
||||
automake];
|
||||
src = null;
|
||||
shellHook = ''
|
||||
unset http_proxy
|
||||
export GIT_SSL_CAINFO=/etc/ssl/certs/ca-bundle.crt
|
||||
SOURCE_DATE_EPOCH=$(date +%s)
|
||||
zsh
|
||||
'';
|
||||
}
|
||||
|
||||
12
package.json
12
package.json
@@ -12,6 +12,11 @@
|
||||
"author": "Felix",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"socket.io": "^2.2.0",
|
||||
"express": "^4.16.4",
|
||||
"popper.js": "^1.14.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.17",
|
||||
"@fortawesome/free-brands-svg-icons": "^5.8.1",
|
||||
"@fortawesome/free-regular-svg-icons": "^5.8.1",
|
||||
@@ -22,7 +27,6 @@
|
||||
"css-loader": "^2.1.1",
|
||||
"datatables": "^1.10.18",
|
||||
"exports-loader": "^0.7.0",
|
||||
"express": "^4.16.4",
|
||||
"extract-text-webpack-plugin": "^4.0.0-beta.0",
|
||||
"file-loader": "^3.0.1",
|
||||
"howler": "^2.1.1",
|
||||
@@ -32,16 +36,12 @@
|
||||
"jquery": "^3.3.1",
|
||||
"node-sass": "^4.11.0",
|
||||
"pdfobject": "^2.1.1",
|
||||
"popper.js": "^1.14.7",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"raw-loader": "^2.0.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"socket.io": "^2.2.0",
|
||||
"style-loader": "^0.23.1",
|
||||
"webpack": "^4.29.6",
|
||||
"webpack-merge": "^4.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"webpack-merge": "^4.2.1",
|
||||
"webpack-cli": "^3.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user