Update 2 files
- /Dockerfile - /.gitlab-ci.yml
This commit is contained in:
parent
f7df051446
commit
e2203be1a9
@ -1,19 +1,20 @@
|
|||||||
docker-build:
|
# docker-build:
|
||||||
# Official docker image.
|
# # Official docker image.
|
||||||
image: docker:latest
|
# image: docker:latest
|
||||||
stage: build
|
# stage: build
|
||||||
variables:
|
# variables:
|
||||||
DOCKER_DRIVER: overlay
|
# 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:
|
deploy:
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
@ -24,3 +25,8 @@ deploy:
|
|||||||
- chmod og= $ID_RSA
|
- chmod og= $ID_RSA
|
||||||
- apk update && apk add openssh-client
|
- 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"
|
- 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
|
@ -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/.next/static ./.next/static
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/public ./.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
|
RUN chown -R nextjs:nodejs /app
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user