Created
July 18, 2022 18:58
-
-
Save vadviktor/7bdf9068ee392e0639442e9816fb2f7d to your computer and use it in GitHub Desktop.
Download Ruby and Rails docs with https://gist.github.com/vadviktor/b3cb6e6b8f9a65fa31a7 and serve them locally with Caddy
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
#!/usr/bin/env bash | |
# JS script paths are absolute in some Ruby docs, convert them to relative. | |
fd --type file --extension html --full-path 'ruby_.*' --exec sd --string-mode 'src="/js/' 'src="js/' |
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
# https://docs.docker.com/compose/compose-file/compose-file-v3/ | |
version: "3.8" | |
services: | |
caddy: | |
image: caddy:2-alpine | |
ports: | |
- 22222:80 | |
networks: | |
- ikon-services | |
restart: unless-stopped | |
volumes: | |
- $HOME/Documents/docs:/docs | |
command: caddy file-server --browse --root /docs | |
networks: | |
ikon-services: | |
name: ikon-services |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment