Skip to content

Docs/local setup instructions#306

Open
RonaldRonnie wants to merge 4 commits intomasterfrom
docs/local-setup-instructions
Open

Docs/local setup instructions#306
RonaldRonnie wants to merge 4 commits intomasterfrom
docs/local-setup-instructions

Conversation

@RonaldRonnie
Copy link

  • Add docs/LOCAL_SETUP.md with step-by-step instructions for running BugSigDB locally
  • Update README.md to reference the new local setup documentation
  • Configure compose.yml for local setup without Traefik:
    • Add port mapping to varnish service (localhost:8081)
    • Comment out network sections for local development
    • Make MW_SITE_SERVER configurable via environment variable
    • Add MW_DB_INSTALLDB_PASS for database initialization
    • Update MW_ADMIN_PASS to use environment variable
  • Document troubleshooting steps for common setup issues
  • Include instructions for both empty database and production backup scenarios
  • Add notes about required environment variables (MW_ADMIN_PASS, MW_DB_INSTALLDB_PASS)

This addresses issue #261 by providing comprehensive documentation for local setup."

- Add comprehensive LOCAL_SETUP.md guide covering:
  - Setup with and without Traefik
  - Database initialization with and without backups
  - Secrets configuration
  - Common troubleshooting issues (Semantic MediaWiki maintenance screen, missing images, etc.)
  - Instructions for updating images from Google Cloud Storage
  - Common maintenance tasks and commands

- Update README.md to reference the new local setup documentation

This addresses issue #261 by documenting the complete process for running
BugSigDB locally, including all troubleshooting steps discovered during
testing.
… for local development

- Add docs/LOCAL_SETUP.md with step-by-step instructions for running BugSigDB locally
- Update README.md to reference the new local setup documentation
- Configure compose.yml for local setup without Traefik:
  - Add port mapping to varnish service (localhost:8081)
  - Comment out network sections for local development
  - Make MW_SITE_SERVER configurable via environment variable
  - Add MW_DB_INSTALLDB_PASS for database initialization
  - Update MW_ADMIN_PASS to use environment variable
- Document troubleshooting steps for common setup issues
- Include instructions for both empty database and production backup scenarios
- Add notes about required environment variables (MW_ADMIN_PASS, MW_DB_INSTALLDB_PASS)

This addresses issue #261 by providing comprehensive documentation for local setup.
@RonaldRonnie RonaldRonnie requested a review from jwokaty December 12, 2025 17:25
@RonaldRonnie
Copy link
Author

Hi @jwokaty . This looks to be the final one to be tested

@jwokaty
Copy link

jwokaty commented Dec 15, 2025

@RonaldRonnie Can #305 be closed (assuming that one is not needed)?

@RonaldRonnie
Copy link
Author

RonaldRonnie commented Dec 16, 2025 via email

Copy link

@jwokaty jwokaty left a comment

Choose a reason for hiding this comment

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

@RonaldRonnie Thanks for your PR. It's very thorough, which I like in documentation.
Please see the inline comments. I've also tried to include the ones made by Ike (tosfos) on the old PR.

I agree with Ike that it would be better to make a local compose to override settings rather than edit the compose.yaml (as mistakes happen). This should change your instructions but greatly simplify them for the end user. Similarly, it might be helpful to also have a corresponding local env.

…g compose.yml

- Create compose.local.yml for local development without Traefik
- Update documentation to use docker compose -f compose.yml -f compose.local.yml
- Move Secrets Configuration section before first docker compose up
- Remove DNS record configuration step (not needed for localtest.me)
- Update all docker compose commands to specify local vs Traefik setup
- Clarify that MW_DB_INSTALLDB_PASS is already configured in compose.yml
@RonaldRonnie
Copy link
Author

Hi @jwokaty @tosfos . Been able to update the PR. Could you please make a review of it again

@jwokaty
Copy link

jwokaty commented Dec 22, 2025

Thanks @RonaldRonnie. I need to follow the instructions to finish the review. I will try to finish this week.

@RonaldRonnie
Copy link
Author

Thank you
I am available for any changes needed

compose.yml Outdated
networks:
- default
- traefik-public
#networks:
Copy link
Contributor

Choose a reason for hiding this comment

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

please leave the network configuration, you can override it in the compose.local.yml file. You can se how I do that for my own personal website setup which also uses traefik at https://github.com/DanielEScherzer/website-content/blob/main/docker-compose.local.yml - adding networks: !reset [] to an individual service will revert the addition of traefik-public, and adding networks: !reset [] to the overall file will remove the dependence on that netwok

# - traefik-public
depends_on:
- web
ports:
Copy link
Contributor

Choose a reason for hiding this comment

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

like with the network changes, this should be done via a compose.local.yml override

Copy link
Contributor

Choose a reason for hiding this comment

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

this port change was added to the compose.local.yml override, but wasn't removed from here

cp database.sql ./__initdb/
```

**Important:** The database file must be placed in the `__initdb/` directory before running `docker compose -f compose.yml -f compose.local.yml up -d --no-start` (for local setup without Traefik) or `docker compose up -d --no-start` (for setup with Traefik).
Copy link
Contributor

Choose a reason for hiding this comment

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

for all of the various docker compose commands with -f for multiple files, you may want to instead suggest using https://docs.docker.com/compose/how-tos/environment-variables/envvars/#compose_file to list the files in the .env configuration instead of needing to include them each time in the command line

This would also mean you don't have to give two different commands for the with and without traefik versions

docker compose up -d db
```

# Access the web container (use -f flags if using local setup)
Copy link
Contributor

Choose a reason for hiding this comment

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

here and for the next few lines the formatting is off, these don't all need to be section headings (e.g. for docker compose exec web bash) and should be code blocks (for the instructions to create a database manually)

@tosfos
Copy link
Collaborator

tosfos commented Jan 1, 2026

Hi @jwokaty @tosfos . Been able to update the PR. Could you please make a review of it again

The above review is from WikiWorks.

@RonaldRonnie
Copy link
Author

hhi @jwokaty , apologies for missing this. let me make the necessary updates to it

@RonaldRonnie
Copy link
Author

hi @jwokaty @tosfos @DanielWTQ can you please take a review of the changes that i have made here

Copy link
Contributor

@DanielWTQ DanielWTQ left a comment

Choose a reason for hiding this comment

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

looking really good - the compose.yml port issue is something that will conflict with WikiWorks, the other two inline notes are just suggestions

# - traefik-public
depends_on:
- web
ports:
Copy link
Contributor

Choose a reason for hiding this comment

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

this port change was added to the compose.local.yml override, but wasn't removed from here

# - Traefik-specific networks are removed for local development

services:
varnish:
Copy link
Contributor

Choose a reason for hiding this comment

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

If the current compose.local.yml works for you, that is great, but I'm surprised that you didn't need to remove the other references to the traefik-public service, e.g.

varnish:
    networks: !reset []

matomo:
    networks: !reset []

cd /path/to/bugsigdb.org

# Create symlink for environment file
ln -s .env.localtest.me .env
Copy link
Contributor

Choose a reason for hiding this comment

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

since .env.localtest.me is not a file that already exists, maybe this should just suggest copying the example env file?

@RonaldRonnie
Copy link
Author

let fix this @DanielWTQ ASAP

@DanielWTQ
Copy link
Contributor

let fix this @DanielWTQ ASAP

Just to confirm, are you asking that I (on behalf of WikiWorks) make the fixing that I suggested? Or are you going to make the fixes and I just review them?

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.

4 participants