Repository navigation
Compose file and template.env: SQLite on one volume by default - #674
Conversation
docker-compose.yml started MySQL and phpMyAdmin by default, loaded template.env (database=mysql and placeholder GitHub credentials) into goblog's environment, and mounted paths that only made sense on the author's machine. template.env defaulted to MySQL too. The compose file now runs goblog alone with GOBLOG_DATA_DIR on a named volume, matching the README quick start, with a commented-out PostgreSQL service. template.env defaults to SQLite, has GitHub login commented out, and says what it is for: setting a site up without the wizard. Closes #656. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Documentation/config-only changes whose every factual claim was verified accurate against the Go code, with no functional risk.
Review effort: Balanced
Findings: None
What changed in this PR
This PR reworks the default docker-compose.yml and template.env so the out-of-the-box experience uses SQLite on a single persistent volume, matching the README quick start, instead of spinning up MySQL + phpMyAdmin with machine-specific mounts and a MySQL-defaulted env file. It closes #656. These are configuration/documentation-only changes with no Go code impact.
Changes:
docker-compose.yml: a singlegoblogservice fromcompscidr/goblog:latestwithGOBLOG_DATA_DIR=/dataon a named volume and port 7000; MySQL/phpMyAdmin/env_file/machine-specific mounts removed; PostgreSQL offered as a commented-out alternative.template.env: defaults todatabase=sqlite/sqlite_db=goblog.db, documents its own purpose andSESSION_KEY, and comments out MySQL/PostgreSQL/GitHub with empty values instead of placeholders.README.md: adds a short paragraph pointing to the compose file and the setup-code log command.
| File | Description |
|---|---|
docker-compose.yml |
Replaces MySQL/phpMyAdmin stack with a single SQLite goblog service on a named volume; PostgreSQL as a commented alternative. |
template.env |
Defaults to SQLite, documents purpose/SESSION_KEY, and comments out other databases and GitHub login with empty values. |
README.md |
Adds a paragraph referencing the compose file and the setup code log retrieval command. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Closes #656.
Problem
docker compose upstarted MySQL and phpMyAdmin alongside goblog, loadedtemplate.envinto goblog's environment (database=mysqland the literal placeholderclient_id=<insert github app developer id>), and mounted paths that only made sense on the author's machine (../:/var/www/html/,${PWD}/test.db).template.envdefaulted to MySQL as well.Changes
docker-compose.yml: onegoblogservice fromcompscidr/goblog:latest,GOBLOG_DATA_DIR=/dataon a named volume, port 7000; the same setup as the README quick start. The header comment says how to start it and find the setup code. A commented-out PostgreSQL service explains what to enter in the wizard. phpMyAdmin, the MySQL service,env_fileand the old mounts are gone;build: .is a commented option for running the checkout.template.env: says what it is for (setting up without the wizard), defaults todatabase=sqlite/sqlite_db=goblog.db, has MySQL, PostgreSQL and GitHub login commented out with empty values instead of placeholders, documentsSESSION_KEY, and no longer says admin login is GitHub-only.README: one paragraph pointing at the compose file.
Testing
docker compose configvalidates.docker compose up -dprinted the setup code and served the setup-code page.postgreswith the documented credentials.Nothing in the code reads either file, so there is no Go change.
local.env, which the old compose file mounted, is still read as a fallback by the login code; I left it alone.🤖 Generated with Claude Code