-
Notifications
You must be signed in to change notification settings - Fork 8
Docs/local setup instructions #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 3 commits
2ed52a8
b8b6d27
a2d27ba
e4cf41b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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: | ||
| # 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} | ||
|
|
||
|
DanielButAtWork marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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} | ||
|
DanielButAtWork marked this conversation as resolved.
|
||
| - MW_SITE_NAME=BugSigDB | ||
| - MW_SITE_LANG=en | ||
| - MW_ENABLE_UPLOADS=1 | ||
|
|
@@ -138,9 +139,9 @@ services: | |
| - matomo | ||
| image: matomo:5.1.1 | ||
| restart: unless-stopped | ||
| networks: | ||
| - default | ||
| - traefik-public | ||
| #networks: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| # - default | ||
| # - traefik-public | ||
| depends_on: | ||
| - matomo-db | ||
| environment: | ||
|
|
@@ -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: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: | ||
|
|
@@ -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: | ||
|
|
||
There was a problem hiding this comment.
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-publicservice, e.g.