diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f99f68b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM ruby:2.5.1 + +ENV LANG=C.UTF-8 + +RUN gem install bundler -v 2.3.27 + +WORKDIR /app + +COPY Gemfile Gemfile.lock /app/ + +RUN bundle install + +COPY . /app + +RUN bundle exec jekyll build + +EXPOSE 4000 + +CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0"] \ No newline at end of file diff --git a/README.md b/README.md index 5b1230d..3a84872 100755 --- a/README.md +++ b/README.md @@ -2,7 +2,15 @@

Personal Website · Build Status

-> Run `bundle exec jekyll serve --config _config.yml,_config-dev.yml` for dev environment +## Build & deployment + +`docker build -t personal-website:1.0.0 .` + +`docker run -p 4000:4000 personal-website:1.0.0 ` + +## Local development + +Run `bundle exec jekyll serve --config _config.yml,_config-dev.yml` for dev environment Notes: @@ -78,12 +86,6 @@ Jekyll: - `jekyll build` ? "jekyll build will wipe everything in /_sites/. The first step of jekyll build is to delete everything in /_sites/ and then build it all again from scratch. So, you can’t store any files in there and expect them to stick around. Everything that goes into /_sites/ should be generated by Jekyll_" -Git: - -- `git remote set-url origin git://new.url.here` -- `git pull origin branchname --allow-unrelated-histories` -- `git reset` only changes local repo, cannot push changes if you reset to a specific commit, need to use `git revert` (https://stackoverflow.com/a/22683231/6521206) - --- # FAQ: