This repository was archived by the owner on May 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ variables :
2+ REGISTRY_URL : " registry.storefrontcloud.io"
3+ REGISTRY_IMAGE : " registry.storefrontcloud.io/test/vue-storefront-api"
4+
5+ stages :
6+ - build
7+ - deploy
8+
9+ build :
10+ stage : build
11+ image :
12+ name : gcr.io/kaniko-project/executor:debug
13+ entrypoint : [""]
14+ script :
15+ - cat config/local.json
16+ - echo "{\"auths\":{\"$REGISTRY_URL\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
17+ - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/dev/docker/Dockerfile --destination $REGISTRY_IMAGE:\${CI_COMMIT_SHA:0:8}
18+ only :
19+ - develop
20+ - master
21+
22+ deploy-to-prod :
23+ stage : deploy
24+ image : alpine
25+ script :
26+ - apk add --no-cache curl
27+ - >
28+ curl -H "Content-Type: application/json" -X POST -d "{\"code\":\"test\", \"apiContainerVersion\":\"\${CI_COMMIT_SHA:0:8}\"}" http://10.29.1.1:4000/instances
29+ environment :
30+ name : staging
31+ url : https://test.storefrontcloud.io/
32+ only :
33+ - master
Original file line number Diff line number Diff line change 1+ FROM node:8-alpine
2+
3+ ENV BIND_HOST=0.0.0.0 ELASTICSEARCH_HOST=elasticsearch ELASTICSEARCH_PORT=9200 REDIS_HOST=redis REDIS_PORT=6379 REDIS_DB=0 PM2_ARGS=--no-daemon VS_ENV=prod
4+
5+ WORKDIR /var/www
6+
7+ COPY . .
8+
9+ RUN apk add --no-cache git \
10+ && yarn install
11+
12+ COPY dev/docker/vue-storefront-api.sh /usr/local/bin/
13+
14+ ENTRYPOINT ["vue-storefront-api.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -e
3+
4+ if [ " $VS_ENV " = ' dev' ]; then
5+ yarn dev
6+ else
7+ yarn start
8+ fi
You can’t perform that action at this time.
0 commit comments