From fb5360e9d14974a2ca5c0dcc366f08ecdbcd22cd Mon Sep 17 00:00:00 2001 From: Software Shinobi Date: Wed, 4 Jun 2025 09:15:59 -0400 Subject: [PATCH] automated terminal push --- .dockerignore | 11 +++++++++ .gitignore | 0 Dockerfile | 5 ++++ Jenkinsfile | 56 ++++++++++++++++++++++++++++++++++++++++++ compose.bash | 19 ++++++++++++++ compose.yaml | 17 +++++++++++++ index.html | 13 ++++++++++ README.md => readme.md | 0 8 files changed, 121 insertions(+) create mode 100644 .dockerignore create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 Jenkinsfile create mode 100755 compose.bash create mode 100644 compose.yaml create mode 100644 index.html rename README.md => readme.md (100%) diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..43cb65d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +.git + +.pristine + +.trash + +.recycle + +.backup + +.template diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c7e06d6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:latest + +WORKDIR /usr/share/nginx/html + +COPY --chown=www-data:www-data --chmod=755 . . diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..580599a --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,56 @@ +pipeline { + + agent none + + options { + + disableConcurrentBuilds(abortPrevious: true) + + buildDiscarder(logRotator(numToKeepStr: '10')) + } + + stages { + + stage('docker compose build') { + + agent { + + label "sian" + + } + + steps { + + dir('.') { + + sh 'docker compose build' + + } + + } + + } + + stage('docker compose push') { + + agent { + + label "sian" + + } + + steps { + + dir('.') { + + sh 'docker compose push' + + } + + } + + } + + } + +} diff --git a/compose.bash b/compose.bash new file mode 100755 index 0000000..b72ea5d --- /dev/null +++ b/compose.bash @@ -0,0 +1,19 @@ +#!/bin/bash + +## + +reset; + +clear; + +## + +set -e; + +set -x; + +## + +docker compose down --remove-orphans + +docker compose up --build -d diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..c5fa378 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,17 @@ +services: + + www.softwareshinobi.come: + + container_name: www.softwareshinobi.com + + image: softwareshinobi/www.softwareshinobi.com + + build: + + context: . + + dockerfile: Dockerfile + + ports: + + - 8000:80 diff --git a/index.html b/index.html new file mode 100644 index 0000000..87977de --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/README.md b/readme.md similarity index 100% rename from README.md rename to readme.md