-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial WIP for Docker generation * Adds wkhtmltopdf * Adds pdftk * Force remove * Run wkhtmltopdf inside xvfb * No arguments to the entrypoint needed * Adds xvfb to apt install * Install pdftk from PPA and add skyward * Adds support for single book generation using Docker
- Loading branch information
Showing
5 changed files
with
112 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
oathbringer | ||
oathbringer-reread | ||
skyward | ||
vendor | ||
wok | ||
wor | ||
books | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# LTS Image | ||
FROM ubuntu:18.04 | ||
|
||
LABEL maintainer="github.cosmere-ebooks@captnemo.in" | ||
|
||
ARG DEBIAN_FRONTEND="noninteractive" | ||
|
||
COPY Gemfile Gemfile.lock /src/ | ||
|
||
WORKDIR /src | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y software-properties-common && \ | ||
add-apt-repository -y ppa:malteworld/ppa && \ | ||
apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
calibre \ | ||
pandoc \ | ||
pdftk \ | ||
ruby \ | ||
ruby-dev \ | ||
wget \ | ||
wkhtmltopdf \ | ||
xvfb \ | ||
zlib1g-dev \ | ||
&& gem install bundler --no-ri --no-rdoc \ | ||
&& bundle install \ | ||
&& apt-get remove -y --purge build-essential \ | ||
&& apt-get clean | ||
|
||
COPY . /src | ||
|
||
ENTRYPOINT ["/src/bootstrap.sh"] | ||
|
||
VOLUME ["/output"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Generate all the books | ||
mkdir -p books | ||
|
||
if [ -z "$1" ] | ||
then | ||
bundle exec ruby edgedancer-reread.rb | ||
bundle exec ruby oathbringer.rb | ||
bundle exec ruby oathbringer-reread.rb | ||
bundle exec ruby wok-prime.rb | ||
bundle exec ruby wok-reread.rb | ||
bundle exec ruby wor-reread.rb | ||
bundle exec ruby skyward.rb | ||
else | ||
bundle exec ruby "$1.rb" | ||
fi | ||
|
||
cp -r books /output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters