diff --git a/Dockerfile b/Dockerfile index 5a68fa7c..886504a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ -FROM node:12 -WORKDIR /usr/src/app +FROM node:15 +RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app +WORKDIR /home/node/app COPY package.json yarn.lock ./ -RUN yarn --frozen-lockfile +RUN yarn --ignore-engines COPY . ./ RUN yarn build EXPOSE 3000 diff --git a/README.md b/README.md index b35b726a..de655510 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,4 @@ Thanks [@paulgergely](https://twitter.com/paulgergely) for the initial flat design! Also see [elm-flatris](https://github.com/w0rm/elm-flatris). +Thanks to signature codes diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 00000000..676233af --- /dev/null +++ b/azure-pipelines-1.yml @@ -0,0 +1,21 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + +- script: | + npm install + npm run build + displayName: 'npm install and build' diff --git a/azure-pipelines-2.yml b/azure-pipelines-2.yml new file mode 100644 index 00000000..676233af --- /dev/null +++ b/azure-pipelines-2.yml @@ -0,0 +1,21 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + +- script: | + npm install + npm run build + displayName: 'npm install and build' diff --git a/azure-pipelines-3.yml b/azure-pipelines-3.yml new file mode 100644 index 00000000..676233af --- /dev/null +++ b/azure-pipelines-3.yml @@ -0,0 +1,21 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: +- master + +pool: + vmImage: ubuntu-latest + +steps: +- task: NodeTool@0 + inputs: + versionSpec: '10.x' + displayName: 'Install Node.js' + +- script: | + npm install + npm run build + displayName: 'npm install and build' diff --git a/azure-pipelines-4.yml b/azure-pipelines-4.yml new file mode 100644 index 00000000..f58a4e5d --- /dev/null +++ b/azure-pipelines-4.yml @@ -0,0 +1,29 @@ +# Docker +# Build a Docker image +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- master + +resources: +- repo: self + +variables: + tag: '$(Build.BuildId)' + +stages: +- stage: Build + displayName: Build image + jobs: + - job: Build + displayName: Build + pool: + vmImage: ubuntu-latest + steps: + - task: Docker@2 + displayName: Build an image + inputs: + command: build + dockerfile: '$(Build.SourcesDirectory)/Dockerfile' + tags: | + $(tag) diff --git a/azure-pipelines-5.yml b/azure-pipelines-5.yml new file mode 100644 index 00000000..f58a4e5d --- /dev/null +++ b/azure-pipelines-5.yml @@ -0,0 +1,29 @@ +# Docker +# Build a Docker image +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- master + +resources: +- repo: self + +variables: + tag: '$(Build.BuildId)' + +stages: +- stage: Build + displayName: Build image + jobs: + - job: Build + displayName: Build + pool: + vmImage: ubuntu-latest + steps: + - task: Docker@2 + displayName: Build an image + inputs: + command: build + dockerfile: '$(Build.SourcesDirectory)/Dockerfile' + tags: | + $(tag) diff --git a/azure-pipelines-6.yml b/azure-pipelines-6.yml new file mode 100644 index 00000000..f58a4e5d --- /dev/null +++ b/azure-pipelines-6.yml @@ -0,0 +1,29 @@ +# Docker +# Build a Docker image +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- master + +resources: +- repo: self + +variables: + tag: '$(Build.BuildId)' + +stages: +- stage: Build + displayName: Build image + jobs: + - job: Build + displayName: Build + pool: + vmImage: ubuntu-latest + steps: + - task: Docker@2 + displayName: Build an image + inputs: + command: build + dockerfile: '$(Build.SourcesDirectory)/Dockerfile' + tags: | + $(tag) diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..901abfe2 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,39 @@ +# Docker +# Build and push an image to Azure Container Registry +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- master + +resources: +- repo: self + +variables: + # Container registry service connection established during pipeline creation + dockerRegistryServiceConnection: '6b09b07c-c850-4b53-95df-5be1f9310371' + imageRepository: 'idikasonsflatris' + containerRegistry: 'signaturedevops.azurecr.io' + dockerfilePath: '$(Build.SourcesDirectory)/Dockerfile' + tag: '$(Build.BuildId)' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + +stages: +- stage: Build + displayName: Build and push stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + steps: + - task: Docker@2 + displayName: Build and push an image to container registry + inputs: + command: buildAndPush + repository: $(imageRepository) + dockerfile: $(dockerfilePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) diff --git a/package.json b/package.json index f56bcc73..dc23e4b7 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,8 @@ "dev:client": "babel-node server/start-dev-client.js", "dev:server": "babel-node server/start-dev-server.js", "dev:server:watch": "nodemon server/start-dev-server.js --exec babel-node", - "build": "env-cmd next build web", - "start": "env-cmd babel-node server/start-prod.js" + "build": "env-cmd -e next build web", + "start": "env-cmd -e babel-node server/start-prod.js" }, "dependencies": { "body-parser": "^1.19.0",