diff --git a/.github/workflows/docker-build-and-push.yml b/.github/workflows/docker-build-and-push.yml new file mode 100644 index 0000000..2c0ec3c --- /dev/null +++ b/.github/workflows/docker-build-and-push.yml @@ -0,0 +1,40 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - adv-docker-example + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/${{ github.repository }} + tags: latest + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: "./solutions/hello-docker" + file: "./solutions/hello-docker/Dockerfile.production" + push: true + tags: ${{ steps.meta.outputs.tags }} diff --git a/solutions/caddy/docker-compose.yml b/solutions/caddy/docker-compose.yml new file mode 100644 index 0000000..a5146dc --- /dev/null +++ b/solutions/caddy/docker-compose.yml @@ -0,0 +1,8 @@ +services: + web: + image: caddy:latest + ports: + - "2019:80" # Map port 8080 on the host to port 80 in the container + volumes: + - ./index.html:/usr/share/caddy/index.html # Mount your single index.html file + restart: always # Optional: automatically restart the service if it stops diff --git a/solutions/caddy/index.html b/solutions/caddy/index.html new file mode 100644 index 0000000..fd462b6 --- /dev/null +++ b/solutions/caddy/index.html @@ -0,0 +1,146 @@ + + +
+Designer
+London, UK
+ex@mail.com
+1224435534
+Skills
+Adobe Photoshop
+Photography
+Illustrator
+Media
+Languages
+English
+Spanish
+German
+Lorem ipsum dolor sit amet. Praesentium magnam consectetur vel in deserunt aspernatur est reprehenderit sunt hic. Nulla tempora soluta ea et odio, unde doloremque repellendus iure, iste.
+Consectetur adipisicing elit. Praesentium magnam consectetur vel in deserunt aspernatur est reprehenderit sunt hic. Nulla tempora soluta ea et odio, unde doloremque repellendus iure, iste.
+Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Web Development! All I need to know in one place
+Master Degree
+Bachelor Degree