Skip to content

Commit

Permalink
EX3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AntalThomas committed Dec 21, 2024
1 parent 8b2345b commit bd31f8a
Show file tree
Hide file tree
Showing 13 changed files with 1,092 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
26 changes: 26 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,29 @@ on:
push:
branches:
- main

jobs:
publish-to-docker-hub:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@6
with:
push: true
tags: AntalThomas/DevOps_With_Docker
Binary file modified Part1/.DS_Store
Binary file not shown.
Binary file modified Part2/.DS_Store
Binary file not shown.
Binary file added Part2/EX2.10/.DS_Store
Binary file not shown.
Binary file modified Part2/EX2.5/.DS_Store
Binary file not shown.
10 changes: 10 additions & 0 deletions Part3/EX3.1/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
express-app:
build: ./express-app

watchtower:
image: containrrr/watchtower:arm64v8-latest
environment:
- WATCHTOWER_POLL_INTERVAL=60
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2 changes: 2 additions & 0 deletions Part3/EX3.1/express-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
docker-compose.yml
7 changes: 7 additions & 0 deletions Part3/EX3.1/express-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:16

COPY . .

RUN npm install

CMD node index.js
3 changes: 3 additions & 0 deletions Part3/EX3.1/express-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## express app

Access with browser http://localhost:8080
12 changes: 12 additions & 0 deletions Part3/EX3.1/express-app/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const express = require('express')
const app = express()

app.get('/', (req, res) => {
res.send('<h1>Hello World!</h1>')
})

const PORT = 8080

app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`)
})
Loading

0 comments on commit bd31f8a

Please sign in to comment.