From e2203be1a9a9a86272f0ecad2a0588bf6e6f2576 Mon Sep 17 00:00:00 2001 From: Fascinated Date: Fri, 13 Jan 2023 23:21:53 +0000 Subject: [PATCH] Update 2 files - /Dockerfile - /.gitlab-ci.yml --- .gitlab-ci.yml | 36 +++++++++++++++++++++--------------- Dockerfile | 2 +- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ceb4667..a26b042 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,19 +1,20 @@ -docker-build: - # Official docker image. - image: docker:latest - stage: build - variables: - DOCKER_DRIVER: overlay +# docker-build: +# # Official docker image. +# image: docker:latest +# stage: build +# variables: +# DOCKER_DRIVER: overlay + +# services: +# - docker:dind +# before_script: +# - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY +# script: +# - docker build --pull -t "$CI_REGISTRY_IMAGE" . +# - docker push "$CI_REGISTRY_IMAGE" +# only: +# - main - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - docker build --pull -t "$CI_REGISTRY_IMAGE" . - - docker push "$CI_REGISTRY_IMAGE" - only: - - main deploy: image: alpine:latest @@ -24,3 +25,8 @@ deploy: - chmod og= $ID_RSA - apk update && apk add openssh-client - ssh -i $ID_RSA -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "cd /home/overlay && docker compose pull && docker compose up -d" + environment: + name: production + url: https://bs-overlay.fascinated.cc + only: + - master \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f79ce11..c6f949a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static COPY --from=builder --chown=nextjs:nodejs /app/public ./.next/static -RUN npm i @beam-australia/react-env +RUN npm i -g @beam-australia/react-env RUN chown -R nextjs:nodejs /app