From zero to a running, healthy database with all extensions live.
If your user is not in the docker group, docker and make will fail
with permission denied ... /var/run/docker.sock. Fix once:
sudo usermod -aG docker $USER
# log out & back in (or run: newgrp docker), then verify:
docker run --rm hello-worldSkip only if you intend to prefix every command with sudo.
git clone https://github.com/programmerShinobi/postgresql-fdw.git
cd postgresql-fdwcp .env.example .env- Change
POSTGRES_PASSWORD. Generate a strong one:
openssl rand -base64 36 | tr -d '/+=' | cut -c1-48Paste it into .env. Review the other values (port, memory caps) — defaults are
sane for the reference laptop. Full reference: doc 3 — Configuration.
make initdoes the copy for you and reminds you to edit the password.
make build # or: docker compose build⏳ First build is slow (a few minutes): it compiles
mysql_fdwfrom source and installs the extension packages. Subsequent builds are cached.
make up # or: docker compose up -dOn the first start, Postgres initialises the data directory and runs the
scripts in scripts/init/ — this is when every extension gets created.
make health # expects: "... accepting connections"
make ps # STATUS should show "healthy"
make logs # watch the boot; look for "database system is ready"-
pg_isreadyreports accepting connections -
docker compose psshows healthy
make extensionsYou should see a table of ~20 rows: postgres_fdw, mysql_fdw, tds_fdw,
file_fdw, vector, pg_cron, pg_partman, pgaudit, pg_repack,
hypopg, pg_hint_plan, orafce, pg_stat_statements, plus the core toolbox.
Full catalogue & usage: doc 4 — Extensions.
With psql inside the container:
make psqlFrom your host (needs a local psql/DBeaver/etc.):
psql "postgresql://local_dev:<password>@127.0.0.1:15409/local_db"| Symptom | Likely cause | Fix |
|---|---|---|
Build fails on mysql_fdw |
transient network / apt mirror | re-run make build |
port is already allocated |
15409 in use | change POSTGRES_HOST_PORT in .env, make up |
| Container restarts in a loop | bad postgresql.conf edit |
make logs, fix the config, make restart |
| Extensions missing | data volume pre-existed init | make destroy && make up ( |
More in doc 9 — Troubleshooting.
✅ Up and healthy? Continue to 3. Configuration »