Skip to content

Instantly share code, notes, and snippets.

@cdreier
cdreier / Dockerfile.pg_cron
Created May 21, 2024 13:35
simplest single Dockerfile setup for local pg_cron
FROM postgres:16-alpine
RUN apk update && apk add postgresql-pg_cron
RUN cp /usr/lib/postgresql16/pg_cron.so /usr/local/lib/postgresql/
RUN cp /usr/share/postgresql/extension/* /usr/local/share/postgresql/extension
RUN echo "echo \"shared_preload_libraries = 'pg_cron'\" >> /var/lib/postgresql/data/postgresql.conf" >> /docker-entrypoint-initdb.d/000_bash.sh
RUN echo "echo \"cron.database_name = 'feeder'\" >> /var/lib/postgresql/data/postgresql.conf" >> /docker-entrypoint-initdb.d/000_bash.sh
RUN echo "echo \"cron.timezone = 'CEST'\" >> /var/lib/postgresql/data/postgresql.conf" >> /docker-entrypoint-initdb.d/000_bash.sh
@cdreier
cdreier / fileserver.go
Last active June 17, 2019 13:55
simple fileserver to serve any directory
package main
import (
"flag"
"log"
"net/http"
"os"
)
func main() {