Source for abhinavsarkar.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. FROM abhin4v/abhinavsarkar.net-base:latest AS builder
  2. ARG REPO_URL
  3. ARG CF_ZONE_ID
  4. ARG CF_API_KEY
  5. ARG CF_EMAIL
  6. ARG STRAVA_KEY
  7. ARG STRAVA_CLIENT_ID
  8. ARG STRAVA_CLIENT_SECRET
  9. ARG STRAVA_REFRESH_TOKEN
  10. ARG DRONE_COMMIT_MESSAGE
  11. ENV ENV=CI
  12. ADD . .
  13. RUN set -xe \
  14. && echo "127.0.0.1 abhinavsarkar.net" >> /etc/hosts \
  15. && stack --no-terminal install --flag hakyll:-previewServer --flag hakyll:-watchServer --flag hakyll:-checkExternal --fast -j2 \
  16. && cd _site \
  17. && git checkout master \
  18. && git pull origin master \
  19. && cd .. \
  20. && ~/.local/bin/site build \
  21. && cd _site \
  22. && git add --all \
  23. && bash ../bin/generate_pdfs.sh \
  24. && git status --short \
  25. && git config --global user.email "abhinav@abhinavsarkar.net" \
  26. && git config --global user.name "Drone.io" \
  27. && git commit -m "$DRONE_COMMIT_MESSAGE" \
  28. && git push "$REPO_URL" master \
  29. && (sh ../bin/purge_cf_cache.sh || true)
  30. FROM abhin4v/hastatic:latest
  31. COPY --from=builder /opt/abhinavsarkar.net/_site /opt/abhinavsarkar.net
  32. COPY --from=builder /opt/abhinavsarkar.net/photos/thumbs /opt/abhinavsarkar.net/photos/thumbs
  33. WORKDIR /opt/abhinavsarkar.net
  34. CMD ["/usr/bin/hastatic"]