diff --git a/Dockerfile b/Dockerfile new file mode 100755 index 0000000..24a672b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM nginx:latest + +##USER www-data + +WORKDIR /usr/share/nginx/html + +COPY --chown=www-data:www-data --chmod=755 . . + diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100755 index 0000000..0dd13fb --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,75 @@ +pipeline { + + agent none + + options { + + disableConcurrentBuilds(abortPrevious: true) + + buildDiscarder(logRotator(numToKeepStr: '1')) + } + + stages { + + stage('docker compose build') { + + agent { + + label "xochi" + + } + + steps { + + dir('.') { + + sh 'docker compose build' + + } + + } + + } + + stage('docker compose push') { + + agent { + + label "xochi" + + } + + steps { + + dir('.') { + + sh 'docker compose push' + + } + + } + + } + + stage('prune') { + + agent { + + label "xochi" + + } + + steps { + + dir('.') { + + sh 'docker system prune -a -f' + + } + + } + + } + +}} + diff --git a/compose.bash b/compose.bash new file mode 100755 index 0000000..8a61369 --- /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 100755 index 0000000..47f18f1 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,20 @@ + +services: + + clocks.jacquesingram.online: + + container_name: clocks.jacquesingram.online + + image: jacqueskingram/clocks.jacquesingram.online + + build: + + context: . + + dockerfile: Dockerfile + + restart: unless-stopped + + ports: + + - "8080:80"