Skip to content

Commit

Permalink
Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricioveronez committed May 8, 2023
1 parent c2b315a commit eb580e1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/azure-webapps-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
npm run test --if-present
working-directory: ./src


- uses: azure/docker-login@v1
with:
username: ${{ secrets.REGISTRY_USERNAME }}
Expand All @@ -58,6 +57,21 @@ jobs:
docker build . -t fabricioveronez/conversao-temperatura:${{ github.sha }}
docker push fabricioveronez/conversao-temperatura:${{ github.sha }}
- name: Build and push Docker images
# You may pin to the exact commit or the version.
# uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
uses: docker/[email protected]
with:
# Build's context is the set of files located in the specified PATH or URL
context: ./src
# Path to the Dockerfile
file: ./src/Dockerfile
pull: # optional, default is false
# Push is a shorthand for --output=type=registry
push: true
tags: |
fabricioveronez/conversao-temperatura:${{ github.sha }}
fabricioveronez/conversao-temperatura:latest
deploy:
permissions:
Expand Down
7 changes: 7 additions & 0 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:18.12.1
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 8080
CMD ["node", "server.js"]

0 comments on commit eb580e1

Please sign in to comment.