Skip to content

Compose file and template.env: SQLite on one volume by default - #674

Merged
compscidr merged 1 commit into
mainfrom
chore/sqlite-default-compose
Oct 3, 2026
Merged

compscidr merged 1 commit into
mainfrom
chore/sqlite-default-compose

Conversation

@compscidr

Copy link
Copy Markdown
Collaborator

Closes #656.

Problem

docker compose up started MySQL and phpMyAdmin alongside goblog, loaded template.env into goblog's environment (database=mysql and the literal placeholder client_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.env defaulted to MySQL as well.

Changes

docker-compose.yml: one goblog service from compscidr/goblog:latest, GOBLOG_DATA_DIR=/data on 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_file and 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 to database=sqlite / sqlite_db=goblog.db, has MySQL, PostgreSQL and GitHub login commented out with empty values instead of placeholders, documents SESSION_KEY, and no longer says admin login is GitHub-only.

README: one paragraph pointing at the compose file.

Testing

  • docker compose config validates.
  • With a locally built image: docker compose up -d printed the setup code and served the setup-code page.
  • With the PostgreSQL service uncommented: after entering the setup code, the wizard's Test Database connected to host postgres with 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

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>
Copilot AI balanced review requested due to automatic review settings October 3, 2026 17:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 single goblog service from compscidr/goblog:latest with GOBLOG_DATA_DIR=/data on a named volume and port 7000; MySQL/phpMyAdmin/env_file/machine-specific mounts removed; PostgreSQL offered as a commented-out alternative.
  • template.env: defaults to database=sqlite/sqlite_db=goblog.db, documents its own purpose and SESSION_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

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@compscidr
compscidr merged commit a1f8adf into main Oct 3, 2026
7 of 8 checks passed
@compscidr
compscidr deleted the chore/sqlite-default-compose branch October 3, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

template.env and docker-compose.yml default to MySQL and phpMyAdmin

2 participants