From 06078a53070d5d8299ac56ce96ab2c379b65ffaa Mon Sep 17 00:00:00 2001 From: igorshelkovenkov Date: Fri, 22 Sep 2023 09:52:21 +0200 Subject: [PATCH] deploy with netlify --- .gitlab-ci.yml | 39 --------------------------------------- Dockerfile | 6 ------ 2 files changed, 45 deletions(-) delete mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e3c9b987..bad91797 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,42 +26,3 @@ build: #- npx npm-force-resolutions - npm install --force - ./node_modules/@angular/cli/bin/ng.js build --aot --vendor-chunk --common-chunk --delete-output-path --build-optimizer --configuration production - -# build docker image -dockerize: - stage: dockerize - dependencies: - - build - image: docker:stable - services: - - docker:dind - before_script: - - docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY} - script: - - echo $BUILD_CODE_IMAGE - - docker build -t $CONTAINER_IMAGE -t $CONTAINER_IMAGE_LATEST . - - docker tag $CONTAINER_IMAGE $CONTAINER_IMAGE_LATEST - - docker push $CONTAINER_IMAGE - - docker push $CONTAINER_IMAGE_LATEST - only: - - tags - -# deploy to server -deploy: - stage: deploy - dependencies: - - dockerize - image: ictu/sshpass:latest - services: - - docker:dind - before_script: - - mkdir -p ~/.ssh - - echo "$DEPLOY_KEY" | tr -d '\r' > ~/.ssh/id_rsa - - chmod 600 ~/.ssh/id_rsa - - eval "$(ssh-agent -s)" - - ssh-add ~/.ssh/id_rsa - - ssh-keyscan -H $PROD_SERVER >> ~/.ssh/known_hosts - script: - - sshpass -p $LOGIN_KEY ssh igor@$PROD_SERVER "cd docker && cd Privat && cd defichain-income && docker login -u $REGISTRY_LOGIN -p $REGISTRY_KEY registry.gitlab.com && ./deploy.sh && exit" - only: - - tags diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 68ab9422..00000000 --- a/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM nginx:latest -RUN rm -rf /usr/share/nginx/html/* -COPY nginx.conf /etc/nginx/nginx.conf -COPY ./dist/defichain-income /usr/share/nginx/html -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"]