From be51f47da8e8960998a31efc6937cfee99e23c83 Mon Sep 17 00:00:00 2001 From: Felix Date: Mon, 23 Nov 2020 18:14:41 +0000 Subject: [PATCH] update README.md, switch user in Dockerfile(drop privileges), remove .gitlab-ci.yml --- .gitlab-ci.yml | 15 --------------- Dockerfile | 2 +- README.md | 2 +- 3 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 481a987..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,15 +0,0 @@ -stages: -- build - -build: - stage: build - image: node:latest - script: - - yarn - - yarn run build - - rm -rf ~/slowdowner/* - - cp -r ./* ~/slowdowner - - ln -s /media/cloud/Musik ~/slowdowner/dist/songs - - ln -s /media/cloud/Noten ~/slowdowner/dist/sheets - - sudo /bin/systemctl restart slowdowner.service - - sudo /bin/systemctl status slowdowner.service \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6fdc711..6ddf569 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,9 +2,9 @@ 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 +USER slowdowner CMD yarn run start EXPOSE 8080 diff --git a/README.md b/README.md index 6644e1d..58d49aa 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ 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``` +```docker build -t slowdowner:v3 .``` for example ### Development