This commit is contained in:
FyloZ 2021-02-11 23:09:36 -05:00
parent 37577e539f
commit 9d04d65437
2 changed files with 3 additions and 4 deletions

View File

@ -69,7 +69,7 @@ package-frontend:
- docker run --name $PACKAGE_CONTAINER_NAME $CI_REGISTRY_IMAGE_NG gradle buildFrontend
- docker cp $PACKAGE_CONTAINER_NAME:/usr/src/cre/dist/frontend/ dist/
- zip -r $ARTIFACT_NAME.zip dist/
- docker build -t $CI_REGISTRY_IMAGE_FRONTEND -f frontend.Dockerfile --build-arg PORT=$FRONTEND_PORT --build-arg ARTIFACT_NAME=$ARTIFACT_NAME .
- docker build -t $CI_REGISTRY_IMAGE_FRONTEND -f frontend.Dockerfile --build-arg --build-arg ARTIFACT_NAME=$ARTIFACT_NAME .
- docker push $CI_REGISTRY_IMAGE_FRONTEND
after_script:
- docker stop $PACKAGE_CONTAINER_NAME || true
@ -112,4 +112,4 @@ deploy-frontend:
<<: *before_deploy
script:
- ssh -p $DEPLOYMENT_SERVER_SSH_PORT $DEPLOYMENT_SERVER_USERNAME@$DEPLOYMENT_SERVER "docker login -u $CI_USERNAME -p $CI_ACCESS_TOKEN $CI_REGISTRY && docker pull $CI_REGISTRY_IMAGE_FRONTEND"
- ssh -p $DEPLOYMENT_SERVER_SSH_PORT $DEPLOYMENT_SERVER_USERNAME@$DEPLOYMENT_SERVER "docker run -d -p $FRONTEND_PORT:$FRONTEND_PORT --name=$DEPLOYED_CONTAINER_NAME $CI_REGISTRY_IMAGE_FRONTEND"
- ssh -p $DEPLOYMENT_SERVER_SSH_PORT $DEPLOYMENT_SERVER_USERNAME@$DEPLOYMENT_SERVER "docker run -d -p $FRONTEND_PORT:80 --name=$DEPLOYED_CONTAINER_NAME $CI_REGISTRY_IMAGE_FRONTEND"

View File

@ -12,7 +12,6 @@ RUN apk add --no-cache zip
RUN unzip $ARTIFACT_NAME.zip
RUN rm $ARTIFACT_NAME.zip
ARG PORT=4200
EXPOSE $PORT
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]