Skip to content

jdemattos/jdemattos-com-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jdemattos-com-web

Site for jdemattos.com.

Dependencies

Usage

Local development

Run caddy-dev instance that listens on http://:8080 or port of choice.

docker run --interactive --tty --rm \
  --name caddy-dev \
  --volume ${PWD}/Caddyfile-dev:/srv/Caddyfile:ro \
  --volume ${PWD}/static:/srv/static:ro \
  --publish 8080:80 \
  caddy \
  caddy run

# OPTIONAL: verify that the web server is working
curl http://localhost:8080

Production deployment

Run caddy service that listens on https and http for redirects with Let's Encrypt for TLS.

# run as service
CADDY_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/caddy"
docker run --detach --restart unless-stopped \
  --name caddy \
  --volume ${PWD}/Caddyfile:/srv/Caddyfile:ro \
  --volume ${PWD}/static:/srv/static:ro \
  --volume ${CADDY_DATA_HOME}/data:/data \
  --volume ${CADDY_DATA_HOME}/config:/config \
  --publish 80:80 \
  --publish 443:443 \
  caddy \
  caddy run

# OPTIONAL: verify that the web server is working
curl https://jdemattos.com --resolve jdemattos.com:443:127.0.0.1

# OPTIONAL: clean up
docker stop caddy
docker rm --volumes caddy

Releases

No releases published

Packages

No packages published