Skip to content

Instantly share code, notes, and snippets.

@martinmurciego
martinmurciego / Dockerfile
Created November 29, 2023 20:22 — forked from JoseCage/Dockerfile
A Dockerfile for a Laravel PHP Application with Caddy Server
FROM php:7.1-fpm
LABEL maintainer="Paul Redmond <[email protected]>"
# Install application dependencies
RUN curl --silent --show-error --fail --location \
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
"https://caddyserver.com/download/linux/amd64?plugins=http.expires,http.realip&license=personal" \
| tar --no-same-owner -C /usr/bin/ -xz caddy \
&& chmod 0755 /usr/bin/caddy \
&& /usr/bin/caddy -version \
@martinmurciego
martinmurciego / caddy-reload.sh
Created November 29, 2023 20:21 — forked from TimoA200/caddy-reload.sh
trigger a graceful reload in caddy docker container
#!/bin/sh
# This script graceful reloads the Caddy server inside the docker container. Graceful means that caddy reloads its configuration with zero downtime.
# Warning: Only works on Linux
caddy_container_id=$(docker ps | grep caddy | awk '{print $1;}')
docker exec $caddy_container_id caddy reload --config /etc/caddy/Caddyfile --adapter caddyfile
@martinmurciego
martinmurciego / index.html
Created November 5, 2017 23:49
Sticky Navbar
<div class="filler one"></div>
<nav id="navbar">
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
</nav>
<div class="filler two"></div>