Skip to content

Commit ce6ee47

Browse files
committed
feat: adding watch command
1 parent 8ad92ac commit ce6ee47

13 files changed

Lines changed: 268 additions & 83 deletions

‎.ci-env.sh‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
export BRANCH=${CI_COMMIT_REF_NAME}
4+
export DOMAIN="nativecode.net"
5+
export PROJECT="plexify"
6+
export ORGANIZATION="opensource"
7+
export SSH_KEY=${SSH_PRIVATE_KEY}
8+
9+
export EMAIL="automaton+${PROJECT}@nativecode.com"
10+
export GIT_HOST="git.${DOMAIN}"
11+
export SSH_HOST="gitssh.${DOMAIN}"
12+
13+
source .citools/ci-export

‎.citools‎

Submodule .citools added at b80f8ae

‎.dockerignore‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,5 @@ lib/
77
node_modules/
88

99
.dockerignore
10-
.editorconfig
11-
.gitattributes
12-
.gitignore
13-
.npmignore
14-
.npmrc
1510
docker-compose.yaml
1611
Dockerfile

‎.gitlab-ci.yml‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
image: docker:19
2+
3+
stages:
4+
- build
5+
6+
services:
7+
- docker:dind
8+
9+
before_script:
10+
- apk --update --no-cache add bash curl git grep gzip jq nodejs npm openssh-client tar
11+
- source .ci-env.sh
12+
- echo -n $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
13+
- .citools/setup-git ${BUILD_REPO_BRANCH} ${BUILD_REPO_GIT} ${BUILD_REPO_EMAIL}
14+
- .citools/setup-ssh ${BUILD_REPO_DOMAIN} ${BUILD_REPO_SSHKEY_PATH} ${BUILD_REPO_DOMAIN_SSH}
15+
16+
master:
17+
stage: build
18+
only:
19+
- master
20+
script:
21+
- docker build --rm -t nativecode/plexify . || exit 1
22+
- docker tag nativecode/plexify nativecode/plexify:$CI_COMMIT_REF_SLUG || exit 1
23+
- docker tag nativecode/plexify nativecode/plexify:latest || exit 1
24+
- docker push nativecode/plexify:$CI_COMMIT_REF_SLUG || exit 1
25+
- docker push nativecode/plexify:latest || exit 1
26+
variables:
27+
DOCKER_HOST: tcp://localhost:2375
28+
GIT_SUBMODULE_STRATEGY: recursive
29+
DOCKER_DRIVER: overlay2
30+
DOCKER_TLS_CERTDIR: ""

‎.gitmodules‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule ".citools"]
2+
path = .citools
3+
url = git@github.com:nativecode-dev/.citools.git

‎.npmrc‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎Dockerfile‎

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
1-
FROM node:12-stretch-slim as BUILD
1+
FROM node:12-alpine as BASE
2+
WORKDIR /app
3+
COPY /package-lock.json /app
4+
COPY /package.json /app
5+
RUN set -e \
6+
&& apk --update --no-cache add bash curl git grep jq \
7+
&& npm install --production \
8+
;
29

3-
WORKDIR /build
410

11+
12+
# -----------------------------------------------------------------------------
13+
# BUILD STAGE
14+
# -----------------------------------------------------------------------------
15+
FROM BASE as BUILD
16+
WORKDIR /build
17+
COPY --from=BASE /app/node_modules /build/node_modules
518
COPY /src /build/src
6-
COPY /.prettierrc /build/
7-
COPY /package-lock.json /build/package-lock.json
8-
COPY /package.json /build/package.json
19+
COPY /.editorconfig /build
20+
COPY /.gitattributes /build
21+
COPY /.gitignore /build
22+
COPY /.gitmodules /build
23+
COPY /.npmignore /build
24+
COPY /.prettierrc /build
25+
COPY /LICENSE /build
26+
COPY /README.md /build
27+
COPY /package-lock.json /build
28+
COPY /package.json /build
929
COPY /tasks.json /build/tasks.json
1030
COPY /tsconfig.json /build/tsconfig.json
1131
COPY /tslint.json /build/tslint.json
@@ -22,11 +42,9 @@ RUN set -e \
2242
# -----------------------------------------------------------------------------
2343
# FINAL STAGE
2444
# -----------------------------------------------------------------------------
25-
FROM nativecode/ffmpeg-cuda:latest as FINAL
26-
27-
COPY --from=BUILD /build/dist/linux/plexify /bin/plexify
28-
45+
FROM BASE as FINAL
46+
COPY --from=BUILD /build/bin /bin/plexify
2947
WORKDIR /media
3048
VOLUME /media
3149

32-
ENTRYPOINT [ "/bin/plexify" ]
50+
ENTRYPOINT [ "/usr/local/bin/node", "/bin/plexify/index.js" ]

0 commit comments

Comments
 (0)