From 514adf404d3f8d25613c8ae6838c3b7760e6bced Mon Sep 17 00:00:00 2001 From: zeus Date: Mon, 29 Nov 2021 11:44:24 +0200 Subject: [PATCH] ad config --- Dockerfile | 74 ------------------- .../usr/share/swarmlab.io/sec/swarmlab-sec | 4 +- 2 files changed, 2 insertions(+), 76 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c2c292f..0000000 --- a/Dockerfile +++ /dev/null @@ -1,74 +0,0 @@ -#FROM alpine:3.11 -FROM node:alpine3.13 - -# Build arguments -ARG app_version -ARG user_name='docker' -ARG user_id='1001' -ARG group_name='docker' -ARG group_id='1001' - -# Update package repositories and install packages -RUN apk add \ - --no-cache \ - --update \ - json-c --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main \ - build-base \ - bash \ - curl \ - ca-certificates \ - findutils \ - font-bakoma-ttf \ - git \ - graphviz \ - inotify-tools \ - make \ - tzdata \ - unzip \ - build-base \ - libxml2-dev \ - which \ - jq \ - openssh augeas && \ - mkdir -p ~root/.ssh /etc/authorized_keys && chmod 700 ~root/.ssh/ && \ - augtool 'set /files/etc/ssh/sshd_config/AuthorizedKeysFile ".ssh/authorized_keys /etc/authorized_keys/%u"' && \ - augtool 'set /files/etc/ssh/sshd_config/PermitRootLogin yes' && \ - augtool 'set /files/etc/ssh/sshd_config/PasswordAuthentication yes' && \ - augtool 'set /files/etc/ssh/sshd_config/Port 22' && \ - cp -a /etc/ssh /etc/ssh.cache && \ - ssh-keygen -A && \ - rm -rf /var/cache/apk/* - - - -# Create non-system user -RUN addgroup \ - --gid "${group_id}" \ - "${group_name}" \ - && adduser \ - --uid "${user_id}" \ - --disabled-password \ - --ingroup $group_name \ - "${user_name}" \ - && mkdir -p /home/${user_name}/run \ - && mkdir -p /home/${user_name}/logs \ - && mkdir -p /home/${user_name}/project \ - && mkdir -p /home/${user_name}/.npm \ - && chown -R ${user_name}.${user_name} /home/${user_name} \ - && chmod -R 755 /home/${user_name} \ - && npm install pm2@latest @vue/cli @vue/cli-service-global -g - - -# Set non-system user -USER "${user_name}" -ENV USER="${user_name}" -ENV HOME="/home/${user_name}" - - -WORKDIR /home/${user_name}/project - -VOLUME /home/${user_name}/project - -EXPOSE 80 443 8080 3000 3080 - -CMD ["node"] diff --git a/install/usr/share/swarmlab.io/sec/swarmlab-sec b/install/usr/share/swarmlab.io/sec/swarmlab-sec index ef45c87..e271036 100755 --- a/install/usr/share/swarmlab.io/sec/swarmlab-sec +++ b/install/usr/share/swarmlab.io/sec/swarmlab-sec @@ -469,7 +469,7 @@ up_master () printf "\\n%s\\n" "$HEADER" echo "$ docker-compose up -d masterservice" printf "\\n" - docker-compose rm -f + docker-compose rm -f -s docker-compose up --build --force-recreate -d masterservice #docker-compose up --force-recreate -d masterservice } @@ -481,7 +481,7 @@ up_workers () printf "\\n%s\\n" "$HEADER" echo "$ docker-compose up -d worker" printf "\\n" - docker-compose rm -f + docker-compose rm -f -s docker-compose up --build --force-recreate -d workerservice #docker-compose up --force-recreate -d workerservice