Compare commits

...

3 Commits

Author SHA1 Message Date
Winston Smith 1f9c311b6c
feat: display current env vars 2024-01-08 22:19:10 +01:00
Winston Smith cf76d23b16
feat: ruby bundle directory as volume
Bundled gems now in persistent volume, dramaticaly increasing service boot.
2024-01-08 22:17:43 +01:00
Winston Smith f55e93d9a2
fix: env var management 2024-01-08 22:16:46 +01:00
3 changed files with 20 additions and 3 deletions

View File

@ -4,7 +4,6 @@ RUN useradd -ms /bin/bash --uid 1000 jekyll
RUN mkdir -p -m 0755 /app/jekyll
RUN mkdir -p -m 0755 /opt/jekyll
COPY ./entrypoint.sh /opt/jekyll
VOLUME $PWD/data:/opt/jekyll
RUN chmod +x /opt/jekyll/ && \
chown -R 1000:1000 /opt/jekyll && \
chown -R 1000:1000 /app

View File

@ -12,4 +12,7 @@ services:
- ${WWW_PORT:-4000}:4000
volumes:
- ./jekyll:/app/jekyll
- ./data:/opt/jekyll
- jekyll_bundle:/usr/local/bundle
volumes:
jekyll_bundle:

View File

@ -1,5 +1,4 @@
#!/bin/bash
source /opt/jekyll/.env
export AUTHOR_EMAIL=$AUTHOR_EMAIL
export BLOG_NAME=$BLOG_NAME
export BASE_URL=$BASE_URL
@ -16,6 +15,22 @@ export TWITTER_USERNAME=$TWITTER_USERNAME
export WWW_PORT=$WWW_PORT
export URL=$URL
printf "🖙 Set values:
🖙 Author email: $AUTHOR_EMAIL
🖙 Blog name: $BLOG_NAME
🖙 Base URL: $BASE_URL
🖙 Github username: $GITHUB_USERNAME
🖙 Host URL: $HOST_URL
🖙 Jekyll environment: $JEKYLL_ENV
🖙 Live-reload port: $LIVERELOAD_PORT
🖙 Local site files path: $SITE_PATH
🖙 Site title: $SITE_TITLE
🖙 Current theme: $THEME
🖙 Xwitter username: $TWITTER_USERNAME
🖙 WWW port: $WWW_PORT
🖙 URL: $URL
"
update_config() {
for ENV_VAR in 'AUTHOR_EMAIL' 'BASE_URL' 'GITHUB_USERNAME' \
'SITE_TITLE' 'THEME' 'TWITTER_USERNAME' 'URL'; do