From 767c1cee0cb1867ba4784ad4a6cc6ce08aa4f1a9 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Thu, 26 Mar 2020 10:02:41 +0100 Subject: [PATCH 01/23] Preview --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ca55ceb9b..54ace4593 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,13 +100,15 @@ jobs: script: lhci autorun --rc-overrides.upload.target=temporary-public-storage --collect.startServerCommand="yarn start:ct" --collect.url=http://localhost:3000 - build_image: - if: branch = master AND type != pull_request + if: type != pull_request name: "Build docker image" stage: docker_build script: - docker build --build-arg COMMIT -t registry.storefrontcloud.io/vsf-next-demo-storefrontcloud-io/vue-storefront:$COMMIT -f dev/docker/Dockerfile . - echo $DOCKER_PASSWORD | docker login -u="$DOCKER_USERNAME" --password-stdin registry.storefrontcloud.io - docker push registry.storefrontcloud.io/vsf-next-demo-storefrontcloud-io/vue-storefront:$COMMIT + - curl $COMMIT.vsf-next-demo.preview.storefrontcloud.io + - echo "This commit preview is available here $COMMIT.vsf-next-demo.preview.storefrontcloud.io" - deploy_to_storefrontcloud: if: branch = master AND type != pull_request From cc13a788dd35ef3d8618baca2674eb945d9bcb9c Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 10:20:12 +0200 Subject: [PATCH 02/23] WIP - github actions for deployment and preview --- .../deploy-preview-storefrontcloud.yml | 66 +++++++++++++++++++ .github/workflows/deploy-storefrontcloud.yml | 63 ++++++++++++++++++ .travis.yml | 34 +++++----- 3 files changed, 146 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/deploy-preview-storefrontcloud.yml create mode 100644 .github/workflows/deploy-storefrontcloud.yml diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml new file mode 100644 index 000000000..4a2238202 --- /dev/null +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -0,0 +1,66 @@ +name: Deploy PR Preview on Storefrontcloud +on: + pull_request: + types: [opened, synchronize] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: "12.x" + - name: Build and publish docker image + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: vsf-next-demo-storefrontcloud-io/vue-storefront:${{ github.sha }} + registry: registry.storefrontcloud.io + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + workdir: ./test-project + dockerfile: dev/docker + buildoptions: "--compress" + deploy: + runs-on: ubuntu-latest + needs: build + steps: + - uses: chrnorm/deployment-action@releases/v1 + name: Create GitHub deployment + id: deployment + with: + token: "${{ github.token }}" + environment: preview + initial_status: in_progress + - name: Deploy on Storefrontcloud.io + id: deploy + uses: storefrontcloud/storefrontcloud-preview-deploy@master + with: + token: "${{ github.token }}" + namespace: "vsf-next-demo" + - name: Comment PR + if: success() + uses: storefrontcloud/storefrontcloud-comment-pr-preview-deploy@master + with: + preview_url: '${{ steps.deploy.outputs.preview_url }}' + token: "${{ github.token }}" + namespace: 'vsf-next-demo' + - name: Update deployment status (success) + if: success() + uses: chrnorm/deployment-status@releases/v1 + with: + token: "${{ github.token }}" + target_url: ${{ steps.deploy.outputs.preview_url }} + state: "success" + description: Congratulations! The deploy is done. + deployment_id: ${{ steps.deployment.outputs.deployment_id }} + - name: Update deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@releases/v1 + with: + token: "${{ github.token }}" + description: Unfortunately, the instance hasn't been updated. + state: "failure" + deployment_id: ${{ steps.deployment.outputs.deployment_id }} \ No newline at end of file diff --git a/.github/workflows/deploy-storefrontcloud.yml b/.github/workflows/deploy-storefrontcloud.yml new file mode 100644 index 000000000..28ceb9e70 --- /dev/null +++ b/.github/workflows/deploy-storefrontcloud.yml @@ -0,0 +1,63 @@ +name: Deploy to Storefrontcloud +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: "12.x" + - name: Build and publish docker image + uses: elgohr/Publish-Docker-Github-Action@master + with: + name: vsf-next-demo-storefrontcloud-io/vue-storefront:${{ github.sha }} + registry: registry.storefrontcloud.io + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + workdir: ./test-project + dockerfile: dev/docker + buildoptions: "--compress" + deploy: + runs-on: ubuntu-latest + needs: build + steps: + - uses: chrnorm/deployment-action@releases/v1 + name: Create GitHub deployment + id: deployment + with: + token: "${{ github.token }}" + target_url: https://vsf-next-demo.storefrontcloud.io + environment: production + initial_status: in_progress + - name: Deploy on Storefrontcloud.io + run: | + if curl -s -u ${{ secrets.CLOUD_USERNAME }}:${{ secrets.CLOUD_PASSWORD }} -H 'Content-Type: application/json' -X POST -d '{"code":"vsf-next-demo","frontContainerVersion":"${{ github.sha }}"}' https://farmer.storefrontcloud.io/instances | grep -q '{"code":200,"result":"Instance updated!"}'; then + echo "Instance updated" + else + echo "Something went wrong during the update process..." + exit 1 + fi + - name: Update deployment status (success) + if: success() + uses: chrnorm/deployment-status@releases/v1 + with: + token: "${{ github.token }}" + target_url: https://vsf-next-demo.storefrontcloud.io + state: "success" + description: Congratulations! The deploy is done. + deployment_id: ${{ steps.deployment.outputs.deployment_id }} + - name: Update deployment status (failure) + if: failure() + uses: chrnorm/deployment-status@releases/v1 + with: + token: "${{ github.token }}" + target_url: https://vsf-next-demo.storefrontcloud.io + description: Unfortunately, the instance hasn't been updated. + state: "failure" + deployment_id: ${{ steps.deployment.outputs.deployment_id }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index e123b71cf..29a32f522 100644 --- a/.travis.yml +++ b/.travis.yml @@ -93,20 +93,20 @@ jobs: name: commercetools script: lhci autorun --rc-overrides.upload.target=temporary-public-storage --collect.startServerCommand="yarn start:ct" --collect.url=http://localhost:3000 - - build_image: - if: type = pull_request - name: "Build docker image" - stage: docker build - script: - - docker build --build-arg COMMIT -t registry.storefrontcloud.io/vsf-next-demo-storefrontcloud-io/vue-storefront:$COMMIT -f dev/docker/Dockerfile . - - echo $DOCKER_PASSWORD | docker login -u="$DOCKER_USERNAME" --password-stdin registry.storefrontcloud.io - - docker push registry.storefrontcloud.io/vsf-next-demo-storefrontcloud-io/vue-storefront:$COMMIT - - curl $COMMIT.vsf-next-demo.preview.storefrontcloud.io - - echo "This commit preview is available here $COMMIT.vsf-next-demo.preview.storefrontcloud.io" - - - deploy_to_storefrontcloud: - if: branch = master AND type != pull_request - name: "Deploy to StorefrontCloud" - stage: deploy - script: - - "curl -u $CLOUD_USERNAME:$CLOUD_PASSWORD -H 'Content-Type: application/json' -X POST -d \"{\\\"code\\\":\\\"vsf-next-demo\\\", \\\"frontContainerVersion\\\":\\\"$COMMIT\\\"}\" https://farmer.storefrontcloud.io/instances" + # - build_image: + # if: type = pull_request + # name: "Build docker image" + # stage: docker build + # script: + # - docker build --build-arg COMMIT -t registry.storefrontcloud.io/vsf-next-demo-storefrontcloud-io/vue-storefront:$COMMIT -f dev/docker/Dockerfile . + # - echo $DOCKER_PASSWORD | docker login -u="$DOCKER_USERNAME" --password-stdin registry.storefrontcloud.io + # - docker push registry.storefrontcloud.io/vsf-next-demo-storefrontcloud-io/vue-storefront:$COMMIT + # - curl $COMMIT.vsf-next-demo.preview.storefrontcloud.io + # - echo "This commit preview is available here $COMMIT.vsf-next-demo.preview.storefrontcloud.io" + + # - deploy_to_storefrontcloud: + # if: branch = master AND type != pull_request + # name: "Deploy to StorefrontCloud" + # stage: deploy + # script: + # - "curl -u $CLOUD_USERNAME:$CLOUD_PASSWORD -H 'Content-Type: application/json' -X POST -d \"{\\\"code\\\":\\\"vsf-next-demo\\\", \\\"frontContainerVersion\\\":\\\"$COMMIT\\\"}\" https://farmer.storefrontcloud.io/instances" From 5bd129b8d6d9501624b58a76c734abbee3a572ac Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 10:50:51 +0200 Subject: [PATCH 03/23] WIP - github actions for deployment and preview --- .github/workflows/deploy-storefrontcloud.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-storefrontcloud.yml b/.github/workflows/deploy-storefrontcloud.yml index 28ceb9e70..a7354af0c 100644 --- a/.github/workflows/deploy-storefrontcloud.yml +++ b/.github/workflows/deploy-storefrontcloud.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - feature/commit_preview_on_storefrontcloud jobs: build: runs-on: ubuntu-latest From 99c5e89fabfedc92db1988cd21d908fa62349ed3 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 11:04:14 +0200 Subject: [PATCH 04/23] WIP - github actions - removed workdir --- .github/workflows/deploy-storefrontcloud.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-storefrontcloud.yml b/.github/workflows/deploy-storefrontcloud.yml index a7354af0c..731bae55a 100644 --- a/.github/workflows/deploy-storefrontcloud.yml +++ b/.github/workflows/deploy-storefrontcloud.yml @@ -21,7 +21,6 @@ jobs: registry: registry.storefrontcloud.io username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - workdir: ./test-project dockerfile: dev/docker buildoptions: "--compress" deploy: From 2453f2cb7022ba6731900f71f2c1c7ac4a1b7bdc Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 11:09:11 +0200 Subject: [PATCH 05/23] WIP - github actions - fixed Dockerfile path --- .github/workflows/deploy-preview-storefrontcloud.yml | 3 +-- .github/workflows/deploy-storefrontcloud.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml index 4a2238202..24e9d4895 100644 --- a/.github/workflows/deploy-preview-storefrontcloud.yml +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -20,8 +20,7 @@ jobs: registry: registry.storefrontcloud.io username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - workdir: ./test-project - dockerfile: dev/docker + dockerfile: dev/docker/Dockerfile buildoptions: "--compress" deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy-storefrontcloud.yml b/.github/workflows/deploy-storefrontcloud.yml index 731bae55a..1c5e5fce1 100644 --- a/.github/workflows/deploy-storefrontcloud.yml +++ b/.github/workflows/deploy-storefrontcloud.yml @@ -21,7 +21,7 @@ jobs: registry: registry.storefrontcloud.io username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - dockerfile: dev/docker + dockerfile: dev/docker/Dockerfile buildoptions: "--compress" deploy: runs-on: ubuntu-latest From 6e3ad8443980f44cce46692436c77dc019a48a31 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 12:09:12 +0200 Subject: [PATCH 06/23] WIP - github actions - universal checker --- .github/workflows/deploy-preview-storefrontcloud.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml index 24e9d4895..7df6bb003 100644 --- a/.github/workflows/deploy-preview-storefrontcloud.yml +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -35,10 +35,12 @@ jobs: initial_status: in_progress - name: Deploy on Storefrontcloud.io id: deploy - uses: storefrontcloud/storefrontcloud-preview-deploy@master + uses: storefrontcloud/storefrontcloud-preview-deploy@feature/universal_checker with: token: "${{ github.token }}" namespace: "vsf-next-demo" + username: ${{ secrets.CLOUD_USERNAME }} + password: ${{ secrets.CLOUD_PASSWORD }} - name: Comment PR if: success() uses: storefrontcloud/storefrontcloud-comment-pr-preview-deploy@master From dfd21b76f37375a5495c7872947bf338c2483af6 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 12:54:32 +0200 Subject: [PATCH 07/23] WIP - github actions - deploy only for master --- .github/workflows/deploy-preview-storefrontcloud.yml | 1 - .github/workflows/deploy-storefrontcloud.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml index 7df6bb003..840f999e9 100644 --- a/.github/workflows/deploy-preview-storefrontcloud.yml +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -2,7 +2,6 @@ name: Deploy PR Preview on Storefrontcloud on: pull_request: types: [opened, synchronize] - jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy-storefrontcloud.yml b/.github/workflows/deploy-storefrontcloud.yml index 1c5e5fce1..4859d1983 100644 --- a/.github/workflows/deploy-storefrontcloud.yml +++ b/.github/workflows/deploy-storefrontcloud.yml @@ -3,7 +3,6 @@ on: push: branches: - master - - feature/commit_preview_on_storefrontcloud jobs: build: runs-on: ubuntu-latest From 1009ba7877f10ae34d1808b9c44a1d5f49aff1fe Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 13:14:09 +0200 Subject: [PATCH 08/23] WIP - github actions - deploy only for master --- .github/workflows/deploy-preview-storefrontcloud.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml index 840f999e9..7df6bb003 100644 --- a/.github/workflows/deploy-preview-storefrontcloud.yml +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -2,6 +2,7 @@ name: Deploy PR Preview on Storefrontcloud on: pull_request: types: [opened, synchronize] + jobs: build: runs-on: ubuntu-latest From 3b61900ed3c4ab5b2ffa8e90632e33f49ef8ad5e Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 13:29:47 +0200 Subject: [PATCH 09/23] WIP - github actions - deploy only for master --- .github/workflows/deploy-preview-storefrontcloud.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml index 7df6bb003..840f999e9 100644 --- a/.github/workflows/deploy-preview-storefrontcloud.yml +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -2,7 +2,6 @@ name: Deploy PR Preview on Storefrontcloud on: pull_request: types: [opened, synchronize] - jobs: build: runs-on: ubuntu-latest From af2b14b3c98d0421359ee4768f93394f3a245e3b Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 13:45:04 +0200 Subject: [PATCH 10/23] WIP - github actions - deploy only for master --- .github/workflows/deploy-preview-storefrontcloud.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml index 840f999e9..7df6bb003 100644 --- a/.github/workflows/deploy-preview-storefrontcloud.yml +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -2,6 +2,7 @@ name: Deploy PR Preview on Storefrontcloud on: pull_request: types: [opened, synchronize] + jobs: build: runs-on: ubuntu-latest From 7c300ff31d742b2fb7e84654612967924f9f03d7 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 14:01:17 +0200 Subject: [PATCH 11/23] WIP - github actions - deploy only for master --- .github/workflows/deploy-preview-storefrontcloud.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml index 7df6bb003..840f999e9 100644 --- a/.github/workflows/deploy-preview-storefrontcloud.yml +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -2,7 +2,6 @@ name: Deploy PR Preview on Storefrontcloud on: pull_request: types: [opened, synchronize] - jobs: build: runs-on: ubuntu-latest From cf9e16d45a0f6ccb6727f0b1413fe8786c4ee456 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 14:19:41 +0200 Subject: [PATCH 12/23] WIP - github actions - deploy only for master --- .github/workflows/deploy-preview-storefrontcloud.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml index 840f999e9..7df6bb003 100644 --- a/.github/workflows/deploy-preview-storefrontcloud.yml +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -2,6 +2,7 @@ name: Deploy PR Preview on Storefrontcloud on: pull_request: types: [opened, synchronize] + jobs: build: runs-on: ubuntu-latest From dd70c76e52f1e91917b18bbc525a2a5b34e7f1e5 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 14:35:22 +0200 Subject: [PATCH 13/23] WIP - github actions - deploy only for master --- .github/workflows/deploy-preview-storefrontcloud.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml index 7df6bb003..840f999e9 100644 --- a/.github/workflows/deploy-preview-storefrontcloud.yml +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -2,7 +2,6 @@ name: Deploy PR Preview on Storefrontcloud on: pull_request: types: [opened, synchronize] - jobs: build: runs-on: ubuntu-latest From 63ce13a656f3cc61cb856005b23b219d6db241ef Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Tue, 7 Apr 2020 14:53:16 +0200 Subject: [PATCH 14/23] Use version 0.1.0 of preview-deploy --- .github/workflows/deploy-preview-storefrontcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-preview-storefrontcloud.yml b/.github/workflows/deploy-preview-storefrontcloud.yml index 840f999e9..690c398aa 100644 --- a/.github/workflows/deploy-preview-storefrontcloud.yml +++ b/.github/workflows/deploy-preview-storefrontcloud.yml @@ -34,7 +34,7 @@ jobs: initial_status: in_progress - name: Deploy on Storefrontcloud.io id: deploy - uses: storefrontcloud/storefrontcloud-preview-deploy@feature/universal_checker + uses: storefrontcloud/storefrontcloud-preview-deploy@0.1.0 with: token: "${{ github.token }}" namespace: "vsf-next-demo" From c7a7ba99adc63f3090e642b705c379b5befb4222 Mon Sep 17 00:00:00 2001 From: andrzejewsky Date: Fri, 10 Apr 2020 12:51:01 +0200 Subject: [PATCH 15/23] fix start --- dev/docker/vue-storefront.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/docker/vue-storefront.sh b/dev/docker/vue-storefront.sh index 547235e1b..7a2ffa472 100755 --- a/dev/docker/vue-storefront.sh +++ b/dev/docker/vue-storefront.sh @@ -2,7 +2,7 @@ set -e if [ "$VS_ENV" = 'dev' ]; then - yarn start:ct + yarn start:ct --hostname 0.0.0.0 --port 3000 else - yarn start:ct + yarn start:ct --hostname 0.0.0.0 --port 3000 fi From 24b24a59bd79550987012eb9bac26ddcd438e60e Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Fri, 10 Apr 2020 13:27:27 +0200 Subject: [PATCH 16/23] Changed host and port for nuxt --- dev/docker/vue-storefront.sh | 4 ++-- package.json | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dev/docker/vue-storefront.sh b/dev/docker/vue-storefront.sh index 7a2ffa472..547235e1b 100755 --- a/dev/docker/vue-storefront.sh +++ b/dev/docker/vue-storefront.sh @@ -2,7 +2,7 @@ set -e if [ "$VS_ENV" = 'dev' ]; then - yarn start:ct --hostname 0.0.0.0 --port 3000 + yarn start:ct else - yarn start:ct --hostname 0.0.0.0 --port 3000 + yarn start:ct fi diff --git a/package.json b/package.json index 1f0048d90..98c7f8a00 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,12 @@ "engines": { "node": "10.x" }, + "config": { + "nuxt": { + "host": "0.0.0.0", + "port": "3000" + } + }, "scripts": { "build:docs": "cd packages/core/docs && yarn build", "dev:docs": "cd packages/core/docs && yarn dev", From a4661798002a116824c20c5135f05705a21e8493 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Fri, 10 Apr 2020 13:43:22 +0200 Subject: [PATCH 17/23] Changed host and port for nuxt --- dev/docker/vue-storefront.sh | 4 ++-- package.json | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dev/docker/vue-storefront.sh b/dev/docker/vue-storefront.sh index 547235e1b..c7e3dd46f 100755 --- a/dev/docker/vue-storefront.sh +++ b/dev/docker/vue-storefront.sh @@ -2,7 +2,7 @@ set -e if [ "$VS_ENV" = 'dev' ]; then - yarn start:ct + HOST=0.0.0.0 yarn start:ct else - yarn start:ct + HOST=0.0.0.0 yarn start:ct fi diff --git a/package.json b/package.json index 98c7f8a00..1f0048d90 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,6 @@ "engines": { "node": "10.x" }, - "config": { - "nuxt": { - "host": "0.0.0.0", - "port": "3000" - } - }, "scripts": { "build:docs": "cd packages/core/docs && yarn build", "dev:docs": "cd packages/core/docs && yarn dev", From 2ecbe90ddd105efb0bad8d9184a451e6c138aa5c Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Fri, 10 Apr 2020 13:49:50 +0200 Subject: [PATCH 18/23] Added expose to dockerfile --- dev/docker/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/docker/Dockerfile b/dev/docker/Dockerfile index e3fc6c7a7..2b0b6a2d1 100644 --- a/dev/docker/Dockerfile +++ b/dev/docker/Dockerfile @@ -14,4 +14,6 @@ RUN yarn install \ COPY dev/docker/vue-storefront.sh /usr/local/bin/ +EXPOSE 3000 + ENTRYPOINT ["vue-storefront.sh"] From 2e9de394943b444cb963b4b782e0d849ce560a6b Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Fri, 10 Apr 2020 13:58:41 +0200 Subject: [PATCH 19/23] Added expose to dockerfile --- dev/docker/Dockerfile | 2 +- dev/docker/vue-storefront.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/docker/Dockerfile b/dev/docker/Dockerfile index 2b0b6a2d1..63d01010a 100644 --- a/dev/docker/Dockerfile +++ b/dev/docker/Dockerfile @@ -1,6 +1,6 @@ FROM node:10 -# ENV NODE_CONFIG_ENV=docker PM2_ARGS=--no-daemon BIND_HOST=0.0.0.0 VS_ENV=prod +ENV NODE_CONFIG_ENV=docker NUXT_HOST=0.0.0.0 NUXT_PORT=3000 ARG COMMIT ENV LAST_COMMIT=${COMMIT} diff --git a/dev/docker/vue-storefront.sh b/dev/docker/vue-storefront.sh index c7e3dd46f..547235e1b 100755 --- a/dev/docker/vue-storefront.sh +++ b/dev/docker/vue-storefront.sh @@ -2,7 +2,7 @@ set -e if [ "$VS_ENV" = 'dev' ]; then - HOST=0.0.0.0 yarn start:ct + yarn start:ct else - HOST=0.0.0.0 yarn start:ct + yarn start:ct fi From 6a8528e3ed14e6de5e7cb4437c8b49159bc3bfc0 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Fri, 10 Apr 2020 14:25:10 +0200 Subject: [PATCH 20/23] WIP - test if config file is used --- packages/commercetools/theme/nuxt.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/commercetools/theme/nuxt.config.js b/packages/commercetools/theme/nuxt.config.js index 7b89a792c..42f99f5d8 100644 --- a/packages/commercetools/theme/nuxt.config.js +++ b/packages/commercetools/theme/nuxt.config.js @@ -6,7 +6,7 @@ const localeNames = config.locales.map(l => l.name); export default { mode: 'universal', server: { - port: 3000, + port: 4000, host: '0.0.0.0' }, head: { From 1dfe06113f5c7039458bacd838ad87a11505a7f4 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Fri, 10 Apr 2020 14:40:28 +0200 Subject: [PATCH 21/23] Back to previous configuration --- dev/docker/Dockerfile | 2 +- packages/commercetools/theme/nuxt.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/docker/Dockerfile b/dev/docker/Dockerfile index 63d01010a..2b0b6a2d1 100644 --- a/dev/docker/Dockerfile +++ b/dev/docker/Dockerfile @@ -1,6 +1,6 @@ FROM node:10 -ENV NODE_CONFIG_ENV=docker NUXT_HOST=0.0.0.0 NUXT_PORT=3000 +# ENV NODE_CONFIG_ENV=docker PM2_ARGS=--no-daemon BIND_HOST=0.0.0.0 VS_ENV=prod ARG COMMIT ENV LAST_COMMIT=${COMMIT} diff --git a/packages/commercetools/theme/nuxt.config.js b/packages/commercetools/theme/nuxt.config.js index 42f99f5d8..7b89a792c 100644 --- a/packages/commercetools/theme/nuxt.config.js +++ b/packages/commercetools/theme/nuxt.config.js @@ -6,7 +6,7 @@ const localeNames = config.locales.map(l => l.name); export default { mode: 'universal', server: { - port: 4000, + port: 3000, host: '0.0.0.0' }, head: { From 1d1f1102a308fd0bfeb8182b89c45a0ce6ee9c9f Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Fri, 10 Apr 2020 14:42:45 +0200 Subject: [PATCH 22/23] Maybe localhost will work --- packages/commercetools/theme/nuxt.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/commercetools/theme/nuxt.config.js b/packages/commercetools/theme/nuxt.config.js index 7b89a792c..f0065d78f 100644 --- a/packages/commercetools/theme/nuxt.config.js +++ b/packages/commercetools/theme/nuxt.config.js @@ -7,7 +7,7 @@ export default { mode: 'universal', server: { port: 3000, - host: '0.0.0.0' + host: 'localhost' }, head: { title: process.env.npm_package_name || '', From ecbacc20bd66c3c14c5dd13bc1b0af76471e1ad5 Mon Sep 17 00:00:00 2001 From: mkoszutowski Date: Fri, 10 Apr 2020 14:58:41 +0200 Subject: [PATCH 23/23] Probably 0.0.0.0 work --- packages/commercetools/theme/nuxt.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/commercetools/theme/nuxt.config.js b/packages/commercetools/theme/nuxt.config.js index f0065d78f..7b89a792c 100644 --- a/packages/commercetools/theme/nuxt.config.js +++ b/packages/commercetools/theme/nuxt.config.js @@ -7,7 +7,7 @@ export default { mode: 'universal', server: { port: 3000, - host: 'localhost' + host: '0.0.0.0' }, head: { title: process.env.npm_package_name || '',