Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Containerized MediaWiki for bugsigdb.org

## Running BugSigDB Locally

**For detailed instructions on setting up and running BugSigDB locally, including troubleshooting and maintenance, see [docs/LOCAL_SETUP.md](docs/LOCAL_SETUP.md).**

The local setup guide covers:
- Getting started and prerequisites
- Database setup (with and without backups)
- Networking options (with and without Traefik)
- Common troubleshooting issues
- Updating images and maintenance tasks

## Briefly

This repo contains [Docker Compose](https://docs.docker.com/compose/) containers to run the [MediaWiki](https://www.mediawiki.org/) software.
Expand Down
23 changes: 23 additions & 0 deletions compose.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Local development override file
# Use with: docker compose -f compose.yml -f compose.local.yml [command]
# This file overrides settings for local development without Traefik
#
# This file ensures:
# - Varnish is exposed on localhost:8081
# - MW_SITE_SERVER is set to http://localhost:8081 (if not set in .env)
# - Network configurations are removed for local development

services:
varnish:

Copy link
Copy Markdown
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 []

# Expose varnish on localhost:8081 for local access
ports:
- "127.0.0.1:8081:80"
# Remove network configuration for local development
# By not specifying networks, services use the default network

web:
# Override MW_SITE_SERVER for local development
# This can also be set via .env file (which takes precedence)
environment:
- MW_SITE_SERVER=${MW_SITE_SERVER:-http://localhost:8081}

25 changes: 14 additions & 11 deletions compose.yml
Comment thread
DanielButAtWork marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ services:
- elasticsearch
command: bash /entrypoint.sh
environment:
- MW_SITE_SERVER=https://bugsigdb.org
- MW_SITE_SERVER=${MW_SITE_SERVER:-https://bugsigdb.org}
- MW_DB_NAME=mediawiki
- MW_DB_PASS=${MYSQL_ROOT_PASSWORD?Variable MYSQL_ROOT_PASSWORD not set}
- MW_DB_INSTALLDB_PASS=${MYSQL_ROOT_PASSWORD?Variable MYSQL_ROOT_PASSWORD not set}
- MW_NCBI_TAXONOMY_API_KEY=${MW_NCBI_TAXONOMY_API_KEY:-}
- MW_RECAPTCHA_SITE_KEY=${MW_RECAPTCHA_SITE_KEY:-}
- MW_RECAPTCHA_SECRET_KEY=${MW_RECAPTCHA_SECRET_KEY:-}
- MW_ADMIN_USER=admin
- MW_ADMIN_PASSWORD
- MW_ADMIN_PASS=${MW_ADMIN_PASS:-anyotherpassword}
Comment thread
DanielButAtWork marked this conversation as resolved.
- MW_SITE_NAME=BugSigDB
- MW_SITE_LANG=en
- MW_ENABLE_UPLOADS=1
Expand Down Expand Up @@ -138,9 +139,9 @@ services:
- matomo
image: matomo:5.1.1
restart: unless-stopped
networks:
- default
- traefik-public
#networks:

Copy link
Copy Markdown
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

# - default
# - traefik-public
depends_on:
- matomo-db
environment:
Expand Down Expand Up @@ -174,11 +175,13 @@ services:
container_name: ${COMPOSE_PROJECT_NAME}_varnish # don't allow to scale the container
image: pastakhov/varnish:7.0
restart: unless-stopped
networks:
- default
- traefik-public
#networks:
# - default
# - traefik-public
depends_on:
- web
ports:

Copy link
Copy Markdown
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
Copy Markdown
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

- "${PORT:-127.0.0.1:8081}:80"
tmpfs:
- /var/lib/varnish:exec
environment:
Expand Down Expand Up @@ -225,9 +228,9 @@ services:
- cron.archive_cron_logs.schedule=@daily
- cron.archive_cron_logs.command=archive-cron-logs 30

networks:
traefik-public:
external: true
#networks:
# traefik-public:
# external: true

volumes:
db_data:
Expand Down
Loading