Compare commits

..

5 Commits

Author SHA1 Message Date
Kameron Kenny 8e52cede23
docker bits 2024-07-01 10:00:52 -04:00
Kameron Kenny 8c8c649693
add imagemagick and exif gems 2024-07-01 10:00:12 -04:00
Kameron Kenny 9f247aa48e
update readme with other options for the gallery generator 2024-07-01 09:36:41 -04:00
Kameron Kenny dcba901acc
add eclipse gallery to config 2024-07-01 09:28:37 -04:00
Kameron Kenny 91a07ccfe2
eclipse photos 2024-07-01 09:28:13 -04:00
18 changed files with 246 additions and 177 deletions

37
Dockerfile Normal file
View File

@ -0,0 +1,37 @@
FROM docker-registry1.in.thelinuxpro.net:5000/tlp/tlp_jekyll:0.0.1
LABEL version="0.0.1"
LABEL image.author.name="Kameron Kenny"
LABEL image.author.email="kameron@localhost"
LABEL description="A Jekyll site for photos.kameronkenny.com."
ARG LOCATION_JEKYLL="/usr/local/jekyll"
ENV GEM_HOME="/usr/local/gems"
ENV PATH="/usr/local/gems/bin:$PATH"
ENV SITE="photos.kameronkenny.com"
ENV NGINX_CONF_D="$LOCATION_JEKYLL/nginx"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt -y upgrade
RUN apt install -y libmagick++-dev
### Shouldn't need this, it's in the Gemfile, but hold just in case.
#RUN gem install rmagick exifr
RUN mkdir -p $LOCATION_JEKYLL/sites/$SITE
WORKDIR /usr/local/sbin
COPY ./entrypoint.sh .
WORKDIR $NGINX_CONF_D
COPY ./app/conf/nginx/nginx.conf .
WORKDIR $LOCATION_JEKYLL/sites/$SITE
COPY . .
RUN bundle install
RUN JEKYLL_ENV=production bundle exec jekyll build
ENTRYPOINT /usr/local/sbin/entrypoint.sh

22
Gemfile
View File

@ -1,28 +1,12 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "bundler"
gem "jekyll", "~> 3.6.0"
gem "rmagick"
gem "exifr"
# # This is the default theme for new Jekyll sites. You may change this to anything you like.
# gem "minima", "~> 2.0"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'jekyll-gallery-generator'

58
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,58 @@
pipeline {
agent {
node {
label 'pi501.in.thelinuxpro.net'
}
}
stages {
stage("verify tooling") {
steps {
sh '''
docker version
docker info
docker compose version
'''
}
}
stage('Build container') {
steps {
script {
def dockerfile = 'Dockerfile'
def containerImage = docker.build("tlp/photos_kameronkenny_com_web:${env.BUILD_ID}", "-f ${dockerfile} .")
docker.withRegistry('http://docker-registry1.in.thelinuxpro.net:5000') {
containerImage.push()
containerImage.push('latest')
}
}
}
}
stage('Create contexts') {
steps {
sh 'docker context ls | grep pi502 || docker context create pi502 --docker "host=ssh://pi502.in.thelinuxpro.net"'
}
}
stage('Start container') {
steps {
script {
//#def status_s = sh(returnStatus: true, script: 'grep $(docker --context pi502 compose ps | tail -n1 | awk \'{ print $2 }\') docker-compose.yml')
sh 'docker --context pi502 compose pull photos_kameronkenny_com_web'
//if (status_s != 0) {
// sh 'docker --context pi502 compose up -d'
// sh 'docker --context pi502 compose ps'
//} else {
sh 'docker --context pi502 compose down || echo "Container already down or does not exist yet."'
sh 'docker --context pi502 compose up -d'
sh 'docker --context pi502 compose ps'
//}
}
}
}
}
}

View File

@ -1,5 +1,39 @@
# Jekyll Photo Gallery
# Gallery Generator
This is a [Jekyll plugin](http://jekyllrb.com/docs/plugins/) that generates galleries from directories full of images. It uses [RMagick](http://rmagick.rubyforge.org/) to create thumbnails.
This plugin is quite minimalist. It generates galleries with no pagination, no sub-galleries, and no descriptions. [See my gallery](http://geoff.greer.fm/photos/) for an example of what it looks like.
[![Gem Version](https://img.shields.io/gem/v/jekyll-gallery-generator.svg)](https://rubygems.org/gems/jekyll-gallery-generator)
[![Build Status](https://travis-ci.org/ggreer/jekyll-gallery-generator.svg?branch=master)](https://travis-ci.org/ggreer/jekyll-gallery-generator)
[![Floobits Status](https://floobits.com/ggreer/jekyll-gallery-generator.svg)](https://floobits.com/ggreer/jekyll-gallery-generator/redirect)
## Usage
1. Install the `jekyll-gallery-generator` gem, either by running `gem install jekyll-gallery-generator` or by adding `gem 'jekyll-gallery-generator'` to your `Gemfile` and running `bundle`.
2. Add `jekyll-gallery-generator` to the plugins list in your `_config.yml`:
```yaml
plugins:
- jekyll-gallery-generator
```
3. Copy your image directories into `jekyll-site/photos/`. Here's what my directory structure looks like:
```bash
$ ls jekyll-site/photos
best/ chile_trip/ japan_trip/
$ ls jekyll-site/photos/chile_trip
IMG_1039.JPG IMG_1046.JPG IMG_1057.JPG
```
4. Run `jekyll build` and be patient. It can take a while to generate all the thumbnails on the first run. After that, you should have pretty pictures.
# Jekyll Photo Gallery
I want to share my jekyll photo gallery, simple, functional, mobile friendly and most essential, pretty! The gallery is based on the design from [Henrrique Gusso](https://gus.so/) and utilizes the [jekyll gallery generator plugin](https://github.com/ggreer/jekyll-gallery-generator) to do most of the heavy lifting (with some minor changes).
![Example Image](https://i.imgur.com/vpmSx7S.png "Optional title")
@ -48,8 +82,23 @@ gallery:
name: "Berlin" # gallery name
date: "2017/08/01" # gallery date
best_image: 0062.jpg # best photo for gallery blur image and gallery index
awesome_stuff:
best_image: snaileo_gonzales.jpg
sort_reverse: true # Reverse sort images in gallery.
secret_stuff:
hidden: true # Don't show this gallery on the index page. People must guess the URL.
with_info:
info:
desc: "Gallery Description" # Info fields can be used in custom templates.
```
## Overriding layouts
If you want to customize the templates used by this generator, copy `gallery_index.html` and `gallery_page.html` to your Jekyll site's `_layouts`:
cp lib/gallery_index.html jekyll-site/_layouts/
cp lib/gallery_page.html jekyll-site/_layouts/
## Thanks to
* The people behind jekyll project
* [Geoff Greer](https://github.com/ggreer) for the script

View File

@ -1,12 +1,12 @@
title: Daniel Andrade Photo Gallery
email: daniel@danielandrade.net
title: Photos
email: noemail@kameronkenny.com
description: >- # this means to ignore newlines until "baseurl:"
My own little photo gallery
Photos
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: dspillere
github_username: dansku
twitter_username: kameronkenny
github_username: kkenny
exclude: [node_modules, Gemfile, Gemfile.lock, gulpfile.js, deploy.sh, README.md, index.md, .gitignore]
@ -30,147 +30,7 @@ gallery:
y: 450
retina: 1.5
galleries:
2017_Canada:
name: "West Coast & Cadanad"
date: "2017/10/01"
best_image: 0191.jpg
2017_Berlin:
name: "Berlin"
date: "2017/08/01"
best_image: 0062.jpg
2017_Istanbul:
name: "Istanbul"
date: "2017/03/18"
best_image: 0008.jpg
2017_USA:
name: "USA"
date: "2017/01/01"
best_image: 0013.jpg
2016_Iceland:
name: "Iceland"
date: "2016/11/16"
best_image: 0020.jpg
2016_Romania:
name: "Romania"
date: "2016/11/05"
best_image: 0022.jpg
2016_Prague:
name: "Prague"
date: "2016/07/13"
best_image: 0015.jpg
2016_London:
name: "London"
date: "2016/04/15"
best_image: 0008.jpg
2016_Thailand:
name: "Thailand"
date: "2016/02/02"
best_image: 0033.jpg
2015_Las_Vegas_and_LA:
name: "Vegas & LA"
date: "2016/01/01"
best_image: 0048.jpg
2015_Suomi:
name: "Suomi"
date: "2015/12/12"
best_image: "0004.jpg"
2015_Dublin:
name: "Dublin 2015"
date: "2015/10.12"
best_image: 0014.jpg
2015_Makerfaire_Berlin:
name: "Makerfaire Berlin"
date: "2015/10/01"
best_image: 0001.jpg
2015_Great_Ocean_Road:
name: "Great Ocean Road"
date: "2015/08/12"
best_image: 0031.jpg
2015_Thailand:
name: "Thailand"
date: "2015/07/12"
best_image: 0069.jpg
2015_Perth:
name: "Perth"
date: "2015/06/12"
best_image: 0038.jpg
2015_Melbourne:
name: "Melbourne"
date: "2015/02/12"
best_image: 0031.jpg
2014_USA:
name: "USA"
date: "2014/10/12"
best_image: 0028.jpg
2014_South_America:
name: "South America"
date: "2014/08/12"
best_image: 0077.jpg
2014_EuroTrip:
name: "EuroTrip"
date: "2014/07/12"
best_image: 0040.jpg
2014_Gravata:
name: "Gravata"
date: "2014/06/12"
best_image: 0003.jpg
2014_Road_To_Patagonia:
name: "Road To Patagonia"
date: "2014/01/12"
best_image: 0038.jpg
2013_Finados_Cemiterio:
name: "Finados"
date: "2013/10/12"
best_image: 0007.jpg
2012_Milano_Design_Week:
name: "Milano Design Week"
date: "2012/10/12"
best_image: 0017.jpg
2012_Road_Trip_Around_Italy:
name: "Road Trip Around Italy"
date: "2013/09/12"
best_image: 0038.jpg
2012_Paris:
name: "Paris"
date: "2012/02/12"
best_image: 0011.jpg
2012_Rome:
name: "Rome"
date: "2012/01/12"
best_image: 0040.jpg
2012_Monaco:
name: "Monaco"
date: "2012/01/10"
best_image: 0012.jpg
2011_Budapest_and_Praga:
name: "Budapest & Praga"
date: "2011/06/12"
best_image: 0031.jpg
2011_Brasil_Papaya:
name: "Brasil Papaya"
date: "2011/10/12"
best_image: 0018.jpg
2011_Arduino_Macro:
name: "Arduino Macros"
date: "2011/10/14"
best_image: 0004.jpg
2010_Scandinavia:
name: "Scandinavia"
date: "2010/12/10"
best_image: 0008.jpg
2009_New_York:
name: "New York"
date: "2009/03/10"
best_image: 0004.jpg
2007_Argentina_and_Chile:
name: "Argentina & Chile"
date: "2007/12/12"
best_image: 0070.jpg
Tarrafa_Hackerspace:
name: "Tarrafa Hackerspace"
date: "2014/09/12"
best_image: 0012.jpg
PCB_Projects:
name: "PCB Projects"
date: "2007/10/10"
best_image: 0016.jpg
202404_eclipse:
name: "2024 Eclipse"
date: "2024/04/08"
best_image: 20240408-DSC06863-Enhanced-SR-final-enhance-8000w.jpg

48
app/conf/nginx/nginx.conf Normal file
View File

@ -0,0 +1,48 @@
user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
gzip off;
server {
listen 4002 default_server;
# listen [::]:80 default_server;
root /usr/local/jekyll/sites/kameronkenny.com/_site;
index index.html index.htm;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
}
}

13
docker-compose.yml Normal file
View File

@ -0,0 +1,13 @@
---
services:
photos_kameronkenny_com_web:
container_name: photos.kameronkenny.com_web
image: docker-registry1.in.thelinuxpro.net:5000/sites/kameronkenny.com:latest
ports:
- '4002:4002'
restart: always
user: root
deploy:
placement:
constraints: [node.role == manager]

20
entrypoint.sh Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env bash
function start_nginx() {
/usr/sbin/nginx -p /usr/local/jekyll/nginx -c nginx.conf
}
function watchtower() {
while true; do
ps -elf | grep nginx | grep -v grep | grep nginx >/dev/null 2>&1
RC=$?
if [[ $RC != 0 ]]; then
start_nginx
fi
sleep 10
done
}
watchtower

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB