update README.md, switch user in Dockerfile(drop privileges), remove .gitlab-ci.yml

This commit is contained in:
2020-11-23 18:14:41 +00:00
parent d409d0cf93
commit be51f47da8
3 changed files with 2 additions and 17 deletions

View File

@@ -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

View File

@@ -2,9 +2,9 @@ FROM node:lts-alpine3.12
RUN mkdir /data RUN mkdir /data
COPY ./ /data COPY ./ /data
WORKDIR /data WORKDIR /data
RUN ls -lash
RUN yarn install --production RUN yarn install --production
RUN adduser --disabled-password --gecos "" slowdowner RUN adduser --disabled-password --gecos "" slowdowner
RUN chown slowdowner:slowdowner /data RUN chown slowdowner:slowdowner /data
USER slowdowner
CMD yarn run start CMD yarn run start
EXPOSE 8080 EXPOSE 8080

View File

@@ -24,7 +24,7 @@ then you can run
```yarn run start``` ```yarn run start```
to run the server locally to run the server locally
or use the provided Dockerfile to create a dockerimage like this or use the provided Dockerfile to create a dockerimage like this
```docker build -t slowdowner:v3``` ```docker build -t slowdowner:v3 .```
for example for example
### Development ### Development