From a139b7749faff285b1007ecd517f60c59666e8ab Mon Sep 17 00:00:00 2001 From: jafreli Date: Thu, 16 Jan 2025 03:17:39 +0100 Subject: [PATCH] init comit --- .gitea/workflows/build-docker.yaml | 27 ++++++++++++++++++++++ dockerfile | 14 ++++++++++++ view/index.html | 17 ++++++++++++++ view/styles.css | 36 ++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 .gitea/workflows/build-docker.yaml create mode 100644 dockerfile create mode 100644 view/index.html create mode 100644 view/styles.css diff --git a/.gitea/workflows/build-docker.yaml b/.gitea/workflows/build-docker.yaml new file mode 100644 index 0000000..615962c --- /dev/null +++ b/.gitea/workflows/build-docker.yaml @@ -0,0 +1,27 @@ +name: Build and Push Docker Image to Gitea Registry + +on: + push: + branches: + - main + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + # Checkout the repository + - name: Checkout Code + uses: actions/checkout@v3 + + # Log in to Gitea Registry using Personal Access Token + - name: Log in to Gitea Registry + run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ secrets.REGISTRY_URL }} -u ${{ secrets.USERNAME }} --password-stdin + + # Build Docker Image + - name: Build Docker Image + run: docker build -t ${{ secrets.REGISTRY_URL }}/${{ secrets.REPOSITORY }}/my-linktree:latest . + + # Push Docker Image to Gitea Registry + - name: Push Docker Image + run: docker push ${{ secrets.REGISTRY_URL }}/${{ secrets.REPOSITORY }}/my-linktree:latest diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..787a4b2 --- /dev/null +++ b/dockerfile @@ -0,0 +1,14 @@ +# Dockerfile +FROM nginx:alpine + +# Kopiere die HTML-Datei in das Nginx-HTML-Verzeichnis +COPY view/index.html /usr/share/nginx/html/index.html + +# Kopiere die CSS-Datei in das Nginx-HTML-Verzeichnis +COPY view/styles.css /usr/share/nginx/html/styles.css + +# Exponiere den Port 80 für den Container +EXPOSE 80 + +# Standardbefehl zum Starten von Nginx +CMD ["nginx", "-g", "daemon off;"] diff --git a/view/index.html b/view/index.html new file mode 100644 index 0000000..7e4e6e0 --- /dev/null +++ b/view/index.html @@ -0,0 +1,17 @@ + + + + + + My Links + + + +
+

My Links

+ LinkTree Sourcecode + Example Link 2 + Example Link 3 +
+ + diff --git a/view/styles.css b/view/styles.css new file mode 100644 index 0000000..3792db1 --- /dev/null +++ b/view/styles.css @@ -0,0 +1,36 @@ +body { + font-family: Arial, sans-serif; + background-color: #f4f4f9; + color: #333; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + margin: 0; +} +.container { + text-align: center; + max-width: 400px; + width: 90%; + background: #fff; + padding: 20px; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} +h1 { + font-size: 24px; + margin-bottom: 20px; +} +.link { + display: block; + margin: 10px 0; + padding: 10px; + background: #007BFF; + color: white; + text-decoration: none; + border-radius: 5px; + transition: background 0.3s ease; +} +.link:hover { + background: #0056b3; +}