[update] docker

This commit is contained in:
2023-10-10 04:18:39 +07:00
parent 73359d5f24
commit 9341b05f89
2 changed files with 5 additions and 5 deletions

View File

@@ -7,8 +7,8 @@ RUN npm install -g @angular/cli
ENV PATH="./node_modules/.bin:$PATH" ENV PATH="./node_modules/.bin:$PATH"
COPY . ./ COPY . ./
RUN ng build --configuration production --base-href /cm-finance-web/ --deploy-url /cm-finance-web/ RUN ng build --configuration production --base-href /cathaypay-web/ --deploy-url /cathaypay-web/
FROM nginx FROM nginx
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=compile-image /opt/ng/dist/cm-finance-web /usr/share/nginx/html COPY --from=compile-image /opt/ng/dist/cathaypay-web /usr/share/nginx/html

View File

@@ -9,14 +9,14 @@ pipelines:
- docker - docker
script: # Modify the commands below to build your repository. script: # Modify the commands below to build your repository.
- docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD - docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
- docker build -f DockerFile -t 71dev/cm-finance-web:dev . - docker build -f DockerFile -t 71dev/cathaypay-web:dev .
- docker push 71dev/cm-finance-web:dev - docker push 71dev/cathaypay-web:dev
- step: - step:
name: Deploy to kubernates name: Deploy to kubernates
image: atlassian/pipelines-kubectl image: atlassian/pipelines-kubectl
script: script:
- echo $KUBE_CONFIG_DELL | base64 -d > kubeconfig - echo $KUBE_CONFIG_DELL | base64 -d > kubeconfig
- kubectl --insecure-skip-tls-verify --kubeconfig=kubeconfig rollout restart deployment/cm-finance-web-deployment -n cm-finance-web - kubectl --insecure-skip-tls-verify --kubeconfig=kubeconfig rollout restart deployment/cathaypay-web-deployment -n cathaypay-web
definitions: definitions:
services: services:
docker: docker: