From: dklawren Date: Fri, 17 Jan 2020 17:35:43 +0000 (-0500) Subject: Bug 1608491 - Improve docker environment for developers wanting to work on bmo code X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4f75dc9e5dd1ad0fc70a8ca53db61520deb2328;p=thirdparty%2Fbugzilla.git Bug 1608491 - Improve docker environment for developers wanting to work on bmo code --- diff --git a/.circleci/config.yml b/.circleci/config.yml index ef74a34e0..c79d2a4d0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,13 +52,13 @@ jobs: - attach_workspace: at: /app/build_info - run: | - docker-compose -f docker-compose.test.yml run --name version_json --entrypoint true bmo-web.vm + docker-compose -f docker-compose.test.yml run --name version_json --entrypoint true bmo.test docker cp version_json:/app/version.json build_info/version.json docker rm version_json - run: name: build push data command: | - docker-compose -f docker-compose.test.yml run --name push_data bmo-web.vm push_data + docker-compose -f docker-compose.test.yml run --name push_data bmo.test push_data docker cp push_data:/app/build_info/blog.push.txt build_info/blog.push.txt docker cp push_data:/app/build_info/bug.push.txt build_info/bug.push.txt docker cp push_data:/app/build_info/email.push.txt build_info/email.push.txt @@ -151,7 +151,7 @@ jobs: name: run sanity tests command: | [[ -f build_info/only_version_changed.txt ]] && exit 0 - docker-compose -f docker-compose.test.yml run --no-deps bmo-web.vm \ + docker-compose -f docker-compose.test.yml run --no-deps bmo.test \ test_sanity $(circleci tests glob 't/*.t' 'extensions/*/t/*.t' | \ circleci tests split) | tee artifacts/$CIRCLE_JOB.txt - store_artifacts: @@ -174,7 +174,7 @@ jobs: at: /app/build_info - run: | [[ -f build_info/only_version_changed.txt ]] && exit 0 - docker-compose -f docker-compose.test.yml run bmo-web.vm test_webservices | \ + docker-compose -f docker-compose.test.yml run bmo.test test_webservices | \ tee artifacts/$CIRCLE_JOB.txt - store_artifacts: path: /app/artifacts @@ -196,7 +196,7 @@ jobs: at: /app/build_info - run: | [[ -f build_info/only_version_changed.txt ]] && exit 0 - docker-compose -f docker-compose.test.yml run bmo-web.vm test_selenium | \ + docker-compose -f docker-compose.test.yml run bmo.test test_selenium | \ tee artifacts/$CIRCLE_JOB.txt - store_artifacts: path: /app/artifacts @@ -218,7 +218,7 @@ jobs: at: /app/build_info - run: | [[ -f build_info/only_version_changed.txt ]] && exit 0 - docker-compose -f docker-compose.test.yml run bmo-web.vm test_bmo -q -f t/bmo/*.t + docker-compose -f docker-compose.test.yml run bmo.test test_bmo -q -f t/bmo/*.t - *store_log workflows: diff --git a/.dockerignore b/.dockerignore index 49c8cc872..1574d719a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,6 +9,8 @@ data localconfig pm_to_blib template_cache +Vagrantfile +vagrant_support \#*\# */\#*\# */*/\#*\# diff --git a/Bugzilla/DaemonControl.pm b/Bugzilla/DaemonControl.pm index 70ea09a29..8c352941e 100644 --- a/Bugzilla/DaemonControl.pm +++ b/Bugzilla/DaemonControl.pm @@ -46,6 +46,7 @@ my $JOBQUEUE_BIN = catfile($BUGZILLA_DIR, 'jobqueue.pl'); my $CEREAL_BIN = catfile($BUGZILLA_DIR, 'scripts', 'cereal.pl'); my $BUGZILLA_BIN = catfile($BUGZILLA_DIR, 'bugzilla.pl'); my $HYPNOTOAD_BIN = catfile($BUGZILLA_DIR, 'local', 'bin', 'hypnotoad'); +my $MORBO_BIN = catfile($BUGZILLA_DIR, 'scripts', 'start_morbo'); my @PERL5LIB = ( $BUGZILLA_DIR, catdir($BUGZILLA_DIR, 'lib'), @@ -55,6 +56,7 @@ my @PERL5LIB = ( my %HTTP_BACKENDS = ( hypnotoad => [$HYPNOTOAD_BIN, $BUGZILLA_BIN, '-f'], simple => [$BUGZILLA_BIN, 'daemon'], + morbo => [$MORBO_BIN] ); sub catch_signal { diff --git a/Dockerfile b/Dockerfile index 99e58e05d..7aeba27de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,8 @@ ENV CIRCLE_SHA1=${CIRCLE_SHA1} ENV LOG4PERL_CONFIG_FILE=log4perl-json.conf +RUN apt-get install -y rsync + # we run a loopback logging server on this TCP port. ENV LOGGING_PORT=5880 diff --git a/Dockerfile.bmo-slim b/Dockerfile.bmo-slim index 8b5806769..4de74b80c 100644 --- a/Dockerfile.bmo-slim +++ b/Dockerfile.bmo-slim @@ -2,9 +2,19 @@ FROM perl:5.30.0-slim AS builder RUN apt-get update RUN apt-get install -y \ - build-essential curl libssl-dev zlib1g-dev openssl \ - libexpat-dev cmake git libcairo-dev libgd-dev \ - default-libmysqlclient-dev unzip wget + apt-file \ + build-essential \ + cmake \ + curl \ + default-libmysqlclient-dev \ + git \ + libcairo-dev \ + libexpat-dev \ + libgd-dev \ + libssl-dev \ + openssl \ + zlib1g-dev + RUN cpanm --notest --quiet App::cpm Module::CPANfile Carton::Snapshot WORKDIR /app @@ -15,7 +25,6 @@ RUN cpm install # secure mail loop fixes RUN cpm install http://s3.amazonaws.com/moz-devservices-bmocartons/third-party/Crypt-OpenPGP-1.15.tar.gz -RUN apt-get install -y apt-file RUN apt-file update RUN find local -name '*.so' -exec ldd {} \; \ | egrep -v 'not.found|not.a.dynamic.executable' \ @@ -31,6 +40,13 @@ ENV DEBIAN_FRONTEND noninteractive COPY --from=builder /app/local /app/local COPY --from=builder /app/PACKAGES /app/PACKAGES -RUN apt-get update && apt-get upgrade -y && apt-get install -y curl git libcap2-bin xz-utils vim $(cat /app/PACKAGES) +RUN apt-get update \ + && apt-get install -y \ + curl \ + git \ + libcap2-bin \ + rsync \ + $(cat /app/PACKAGES) \ + && rm -rf /var/cache/apt/* /var/lib/apt/lists/* RUN useradd -u 10001 -U app -m && setcap 'cap_net_bind_service=+ep' /usr/local/bin/perl diff --git a/README.rst b/README.rst index c2aa78e1a..ac0219b12 100644 --- a/README.rst +++ b/README.rst @@ -58,20 +58,20 @@ If this fails, please file a bug `using this link Save to save your changes. Still in Powershell as Administrator, set an environment variable to use for Vagrantfile. @@ -278,8 +278,8 @@ The procedure should be similar for other browsers. .. _`Firefox Connection Settings`: https://support.mozilla.org/en-US/kb/connection-settings-firefox -After that, you should be able to visit http://bmo-web.vm/ from your browser. -You can login as vagrant@bmo-web.vm with the password "vagrant01!" (without +After that, you should be able to visit http://bmo.test/ from your browser. +You can login as vagrant@bmo.test with the password "vagrant01!" (without quotes). Ensuring your Docker setup on Ubuntu 16.04 @@ -531,7 +531,7 @@ Testing Emails -------------- With vagrant have two options to test emails sent by a local Bugzilla instance. You can configure -which setting you want to use by going to http://bmo-web.vm/editparams.cgi?section=mta and +which setting you want to use by going to http://bmo.test/editparams.cgi?section=mta and changing the mail_delivery_method to either 'Test' or 'Sendmail'. Afterwards restart BMO with ``vagrant reload``. With docker, only the default 'Test' option is supported. @@ -540,17 +540,17 @@ changing the mail_delivery_method to either 'Test' or 'Sendmail'. Afterwards res With this option, all mail will be appended to a ``mailer.testfile``. -- Using docker, run ``docker-compose run bmo-web.vm cat /app/data/mailer.testfile``. +- Using docker, run ``docker-compose run bmo.test cat /app/data/mailer.testfile``. - Using vagrant, run ``vagrant ssh web`` and then navigate to ``/vagrant/data/mailer.testfile``. 'Sendmail' option (Default for Vagrant) --------------------------------------- This option is useful if you want to preview email using a real mail client. -An imap server is running on bmo-web.vm on port 143 and you can connect to it with +An imap server is running on bmo.test on port 143 and you can connect to it with the following settings: -- host: bmo-web.vm +- host: bmo.test - port: 143 - encryption: No SSL, Plaintext password - username: vagrant @@ -561,10 +561,10 @@ multiple imap accounts. `Thunderbird's`_ wizard to add a new "Existing Mail Account" doesn't work with bmo-web. It fails because it wants to create a mail account with both incoming mail (IMAP) and outgoing -mail (SMTP, which bmo-web.vm doesn't provide). To work around this, using a regular email +mail (SMTP, which bmo.test doesn't provide). To work around this, using a regular email account to first setup, then modify the settings of that account: Right Click the account in the left side bar > Settings > Server Settings. Update the server settings to match those -listed above. Afterwards, you may update the account name to be vagrant@bmo-web.vm. Thunderbird +listed above. Afterwards, you may update the account name to be vagrant@bmo.test. Thunderbird will now pull email from BMO. You can try it out by commenting on a bug. .. _`Thunderbird's`: https://www.mozilla.org/en-US/thunderbird/ diff --git a/conf/checksetup_answers.txt b/conf/checksetup_answers.txt index 236139fa6..2a9d6dc32 100644 --- a/conf/checksetup_answers.txt +++ b/conf/checksetup_answers.txt @@ -1,4 +1,4 @@ -$answer{'ADMIN_EMAIL'} = 'vagrant@bmo-web.vm'; +$answer{'ADMIN_EMAIL'} = 'vagrant@bmo.test'; $answer{'ADMIN_OK'} = 'Y'; $answer{'ADMIN_PASSWORD'} = 'vagrant01!'; $answer{'passwdqc_min'} = '8, 8, 8, 8, 8'; diff --git a/docker-compose.test.yml b/docker-compose.test.yml index b9a05aefe..4bae22506 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -5,7 +5,7 @@ version: '3' services: - bmo-web.vm: + bmo.test: image: bmo command: dev_httpd tmpfs: @@ -13,7 +13,7 @@ services: - /run environment: - 'BMO_inbound_proxies=*' - - BMO_db_host=bmo-db.vm + - BMO_db_host=bmo.db - BMO_db_name=bugs - BMO_db_pass=bugs - BMO_db_user=bugs @@ -36,11 +36,11 @@ services: - TWD_HOST=selenium - TWD_PORT=4444 depends_on: - - bmo-db.vm + - bmo.db - memcached - selenium - bmo-db.vm: + bmo.db: image: mozillabteam/bmo-mysql:5.7 logging: driver: "none" diff --git a/docker-compose.yml b/docker-compose.yml index 36c20e5f9..0e59b3f3d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,39 +2,41 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -version: '2' +version: '3.4' services: - bmo-web.vm: + bmo.test: build: &bmo_build context: . dockerfile: Dockerfile command: dev_httpd volumes: - bmo-data-dir:/app/data + - .:/mnt/sync tmpfs: - /tmp - /run environment: &bmo_env - - LOCALCONFIG_ENV=1 - - LOG4PERL_CONFIG_FILE=log4perl-docker.conf - - BUGZILLA_ALLOW_INSECURE_HTTP=1 - - HTTP_BACKEND=simple - - PORT=80 - - BMO_db_host=bmo-db.vm + - 'BMO_inbound_proxies=*' + - BMO_db_host=bmo.db - BMO_db_name=bugs - - BMO_db_user=bugs - BMO_db_pass=bugs - - BMO_urlbase=http://bmo-web.vm/ + - BMO_db_user=bugs - BMO_memcached_namespace=bugzilla - BMO_memcached_servers=memcached:11211 - - 'BMO_inbound_proxies=*' + - BMO_urlbase=http://bmo.test/ + - BUGZILLA_ALLOW_INSECURE_HTTP=1 - BZ_ANSWERS_FILE=/app/conf/checksetup_answers.txt + - HTTP_BACKEND=morbo + - LOCALCONFIG_ENV=1 + - LOG4PERL_CONFIG_FILE=log4perl-docker.conf + - MOJO_LISTEN=http://*:80 + - PORT=80 depends_on: - - bmo-db.vm + - bmo.db - memcached - bmo-jobqueue.vm: + bmo.jobqueue: build: *bmo_build command: jobqueue volumes: @@ -45,13 +47,52 @@ services: environment: *bmo_env restart: always depends_on: - - bmo-db.vm + - bmo.db + - memcached + + bmo.feed: + build: *bmo_build + command: + - perl + - extensions/PhabBugz/bin/phabbugz_feed.pl + - start + - '-d' + - '-f' + volumes: + - bmo-data-dir:/app/data + tmpfs: + - /tmp + - /run + environment: *bmo_env + restart: always + depends_on: + - bmo.db + - memcached + + bmo.pushd: + build: *bmo_build + command: + - perl + - extensions/Push/bin/bugzilla-pushd.pl + - start + - '-d' + - '-f' + volumes: + - bmo-data-dir:/app/data + tmpfs: + - /tmp + - /run + environment: *bmo_env + restart: always + depends_on: + - bmo.db - memcached - bmo-db.vm: - image: mozillabteam/bmo-mysql:5.7 + bmo.db: + image: mysql:5.7 volumes: - bmo-mysql-db:/var/lib/mysql + - ./docker/mysql:/etc/mysql/conf.d logging: driver: "none" environment: @@ -64,9 +105,11 @@ services: image: memcached:latest tinyproxy: - image: mozillabteam/tinyproxy + build: + context: docker/tinyproxy + dockerfile: ./Dockerfile ports: - - "1091:1090" + - "1080:1080" volumes: bmo-mysql-db: diff --git a/docker/mysql/bmo.cnf b/docker/mysql/bmo.cnf new file mode 100644 index 000000000..e05c42ea2 --- /dev/null +++ b/docker/mysql/bmo.cnf @@ -0,0 +1,8 @@ +[mysqld] +max_allowed_packet = 10485760 +innodb_file_format = Barracuda +innodb_file_per_table = 1 +innodb_large_prefix = 1 + +[mysql] +max_allowed_packet = 10485760 diff --git a/docker/tinyproxy/Dockerfile b/docker/tinyproxy/Dockerfile new file mode 100644 index 000000000..2f17d04fc --- /dev/null +++ b/docker/tinyproxy/Dockerfile @@ -0,0 +1,13 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +FROM alpine:3.3 + +RUN apk --no-cache add tinyproxy + +COPY tinyproxy.conf /tinyproxy.conf + +EXPOSE 1080 +ENTRYPOINT ["tinyproxy"] +CMD ["-d", "-c", "/tinyproxy.conf"] diff --git a/docker/tinyproxy/tinyproxy.conf b/docker/tinyproxy/tinyproxy.conf new file mode 100644 index 000000000..76d436a89 --- /dev/null +++ b/docker/tinyproxy/tinyproxy.conf @@ -0,0 +1,330 @@ +## +## tinyproxy.conf -- tinyproxy daemon configuration file +## +## This example tinyproxy.conf file contains example settings +## with explanations in comments. For decriptions of all +## parameters, see the tinproxy.conf(5) manual page. +## + +# +# User/Group: This allows you to set the user and group that will be +# used for tinyproxy after the initial binding to the port has been done +# as the root user. Either the user or group name or the UID or GID +# number may be used. +# +#User nobody +#Group nogroup + +# +# Port: Specify the port which tinyproxy will listen on. Please note +# that should you choose to run on a port lower than 1024 you will need +# to start tinyproxy using root. +# +Port 1080 + +# +# Listen: If you have multiple interfaces this allows you to bind to +# only one. If this is commented out, tinyproxy will bind to all +# interfaces present. +# +#Listen 192.168.0.1 + +# +# Bind: This allows you to specify which interface will be used for +# outgoing connections. This is useful for multi-home'd machines where +# you want all traffic to appear outgoing from one particular interface. +# +#Bind 192.168.0.1 + +# +# BindSame: If enabled, tinyproxy will bind the outgoing connection to the +# ip address of the incoming connection. +# +#BindSame yes + +# +# Timeout: The maximum number of seconds of inactivity a connection is +# allowed to have before it is closed by tinyproxy. +# +Timeout 60 + +# +# ErrorFile: Defines the HTML file to send when a given HTTP error +# occurs. You will probably need to customize the location to your +# particular install. The usual locations to check are: +# /usr/local/share/tinyproxy +# /usr/share/tinyproxy +# /etc/tinyproxy +# +#ErrorFile 404 "/usr/share/tinyproxy/404.html" +#ErrorFile 400 "/usr/share/tinyproxy/400.html" +#ErrorFile 503 "/usr/share/tinyproxy/503.html" +#ErrorFile 403 "/usr/share/tinyproxy/403.html" +#ErrorFile 408 "/usr/share/tinyproxy/408.html" + +# +# DefaultErrorFile: The HTML file that gets sent if there is no +# HTML file defined with an ErrorFile keyword for the HTTP error +# that has occured. +# +DefaultErrorFile "/usr/share/tinyproxy/default.html" + +# +# StatHost: This configures the host name or IP address that is treated +# as the stat host: Whenever a request for this host is received, +# Tinyproxy will return an internal statistics page instead of +# forwarding the request to that host. The default value of StatHost is +# tinyproxy.stats. +# +#StatHost "tinyproxy.stats" +# + +# +# StatFile: The HTML file that gets sent when a request is made +# for the stathost. If this file doesn't exist a basic page is +# hardcoded in tinyproxy. +# +StatFile "/usr/share/tinyproxy/stats.html" + +# +# Logfile: Allows you to specify the location where information should +# be logged to. If you would prefer to log to syslog, then disable this +# and enable the Syslog directive. These directives are mutually +# exclusive. +# +Logfile "/var/log/tinyproxy/tinyproxy.log" + +# +# Syslog: Tell tinyproxy to use syslog instead of a logfile. This +# option must not be enabled if the Logfile directive is being used. +# These two directives are mutually exclusive. +# +#Syslog On + +# +# LogLevel: +# +# Set the logging level. Allowed settings are: +# Critical (least verbose) +# Error +# Warning +# Notice +# Connect (to log connections without Info's noise) +# Info (most verbose) +# +# The LogLevel logs from the set level and above. For example, if the +# LogLevel was set to Warning, then all log messages from Warning to +# Critical would be output, but Notice and below would be suppressed. +# +LogLevel Info + +# +# PidFile: Write the PID of the main tinyproxy thread to this file so it +# can be used for signalling purposes. +# +PidFile "/var/run/tinyproxy/tinyproxy.pid" + +# +# XTinyproxy: Tell Tinyproxy to include the X-Tinyproxy header, which +# contains the client's IP address. +# +#XTinyproxy Yes + +# +# Upstream: +# +# Turns on upstream proxy support. +# +# The upstream rules allow you to selectively route upstream connections +# based on the host/domain of the site being accessed. +# +# For example: +# # connection to test domain goes through testproxy +# upstream testproxy:8008 ".test.domain.invalid" +# upstream testproxy:8008 ".our_testbed.example.com" +# upstream testproxy:8008 "192.168.128.0/255.255.254.0" +# +# # no upstream proxy for internal websites and unqualified hosts +# no upstream ".internal.example.com" +# no upstream "www.example.com" +# no upstream "10.0.0.0/8" +# no upstream "192.168.0.0/255.255.254.0" +# no upstream "." +# +# # connection to these boxes go through their DMZ firewalls +# upstream cust1_firewall:8008 "testbed_for_cust1" +# upstream cust2_firewall:8008 "testbed_for_cust2" +# +# # default upstream is internet firewall +# upstream firewall.internal.example.com:80 +# +# The LAST matching rule wins the route decision. As you can see, you +# can use a host, or a domain: +# name matches host exactly +# .name matches any host in domain "name" +# . matches any host with no domain (in 'empty' domain) +# IP/bits matches network/mask +# IP/mask matches network/mask +# +#Upstream some.remote.proxy:port + +# +# MaxClients: This is the absolute highest number of threads which will +# be created. In other words, only MaxClients number of clients can be +# connected at the same time. +# +MaxClients 50 + +# +# MinSpareServers/MaxSpareServers: These settings set the upper and +# lower limit for the number of spare servers which should be available. +# +# If the number of spare servers falls below MinSpareServers then new +# server processes will be spawned. If the number of servers exceeds +# MaxSpareServers then the extras will be killed off. +# +MinSpareServers 5 +MaxSpareServers 20 + +# +# StartServers: The number of servers to start initially. +# +StartServers 10 + +# +# MaxRequestsPerChild: The number of connections a thread will handle +# before it is killed. In practise this should be set to 0, which +# disables thread reaping. If you do notice problems with memory +# leakage, then set this to something like 10000. +# +MaxRequestsPerChild 1000 + +# +# Allow: Customization of authorization controls. If there are any +# access control keywords then the default action is to DENY. Otherwise, +# the default action is ALLOW. +# +# The order of the controls are important. All incoming connections are +# tested against the controls based on order. +# +#Allow 127.0.0.1 +#Allow 192.168.0.0/16 +#Allow 172.16.0.0/12 +#Allow 10.0.0.0/8 + +# +# AddHeader: Adds the specified headers to outgoing HTTP requests that +# Tinyproxy makes. Note that this option will not work for HTTPS +# traffic, as Tinyproxy has no control over what headers are exchanged. +# +#AddHeader "X-My-Header" "Powered by Tinyproxy" + +# +# ViaProxyName: The "Via" header is required by the HTTP RFC, but using +# the real host name is a security concern. If the following directive +# is enabled, the string supplied will be used as the host name in the +# Via header; otherwise, the server's host name will be used. +# +ViaProxyName "tinyproxy" + +# +# DisableViaHeader: When this is set to yes, Tinyproxy does NOT add +# the Via header to the requests. This virtually puts Tinyproxy into +# stealth mode. Note that RFC 2616 requires proxies to set the Via +# header, so by enabling this option, you break compliance. +# Don't disable the Via header unless you know what you are doing... +# +#DisableViaHeader Yes + +# +# Filter: This allows you to specify the location of the filter file. +# +#Filter "/etc/filter" + +# +# FilterURLs: Filter based on URLs rather than domains. +# +#FilterURLs On + +# +# FilterExtended: Use POSIX Extended regular expressions rather than +# basic. +# +#FilterExtended On + +# +# FilterCaseSensitive: Use case sensitive regular expressions. +# +#FilterCaseSensitive On + +# +# FilterDefaultDeny: Change the default policy of the filtering system. +# If this directive is commented out, or is set to "No" then the default +# policy is to allow everything which is not specifically denied by the +# filter file. +# +# However, by setting this directive to "Yes" the default policy becomes +# to deny everything which is _not_ specifically allowed by the filter +# file. +# +#FilterDefaultDeny Yes + +# +# Anonymous: If an Anonymous keyword is present, then anonymous proxying +# is enabled. The headers listed are allowed through, while all others +# are denied. If no Anonymous keyword is present, then all headers are +# allowed through. You must include quotes around the headers. +# +# Most sites require cookies to be enabled for them to work correctly, so +# you will need to allow Cookies through if you access those sites. +# +#Anonymous "Host" +#Anonymous "Authorization" +#Anonymous "Cookie" + +# +# ConnectPort: This is a list of ports allowed by tinyproxy when the +# CONNECT method is used. To disable the CONNECT method altogether, set +# the value to 0. If no ConnectPort line is found, all ports are +# allowed (which is not very secure.) +# +# The following two ports are used by SSL. +# +#ConnectPort 443 +#ConnectPort 563 + +# +# Configure one or more ReversePath directives to enable reverse proxy +# support. With reverse proxying it's possible to make a number of +# sites appear as if they were part of a single site. +# +# If you uncomment the following two directives and run tinyproxy +# on your own computer at port 8888, you can access Google using +# http://localhost:8888/google/ and Wired News using +# http://localhost:8888/wired/news/. Neither will actually work +# until you uncomment ReverseMagic as they use absolute linking. +# +#ReversePath "/google/" "http://www.google.com/" +#ReversePath "/wired/" "http://www.wired.com/" + +# +# When using tinyproxy as a reverse proxy, it is STRONGLY recommended +# that the normal proxy is turned off by uncommenting the next directive. +# +#ReverseOnly Yes + +# +# Use a cookie to track reverse proxy mappings. If you need to reverse +# proxy sites which have absolute links you must uncomment this. +# +#ReverseMagic Yes + +# +# The URL that's used to access this reverse proxy. The URL is used to +# rewrite HTTP redirects so that they won't escape the proxy. If you +# have a chain of reverse proxies, you'll need to put the outermost +# URL here (the address which the end user types into his/her browser). +# +# If not set then no rewriting occurs. +# +#ReverseBaseURL "http://localhost:8888/" diff --git a/scripts/auth-test-app b/scripts/auth-test-app index 419565ca5..19c0fc192 100755 --- a/scripts/auth-test-app +++ b/scripts/auth-test-app @@ -12,7 +12,7 @@ use warnings; use Mojolicious::Lite; use Digest::SHA qw(sha256_hex); -my $BUGZILLA_URL = $ENV{AUTH_TEST_BUGZILLA_URL} // 'http://bmo-web.vm/auth.cgi'; +my $BUGZILLA_URL = $ENV{AUTH_TEST_BUGZILLA_URL} // 'http://bmo.test/auth.cgi'; my $APP_DESC = $ENV{AUTH_TEST_APP_DESC} // 'AuthTest'; my %SECRETS; diff --git a/scripts/entrypoint.pl b/scripts/entrypoint.pl index 3d71fb490..499bbd4c3 100755 --- a/scripts/entrypoint.pl +++ b/scripts/entrypoint.pl @@ -122,7 +122,7 @@ sub cmd_dev_httpd { run( 'perl', 'scripts/generate_bmo_data.pl', '--param' => 'use_mailer_queue=0', - 'vagrant@bmo-web.vm' + 'vagrant@bmo.test' ); } diff --git a/scripts/start_morbo b/scripts/start_morbo index 4a0bb3467..b741214e0 100755 --- a/scripts/start_morbo +++ b/scripts/start_morbo @@ -25,8 +25,8 @@ use Env qw( chdir $BUGZILLA_DIR; -my $cert_file = catfile($BUGZILLA_DIR, 'bmo-web.vm.pem'); -my $key_file = catfile($BUGZILLA_DIR, 'bmo-web.vm-key.pem'); +my $cert_file = catfile($BUGZILLA_DIR, 'bmo.test.pem'); +my $key_file = catfile($BUGZILLA_DIR, 'bmo.test-key.pem'); if ($MOJO_LISTEN && -f $cert_file && -f $key_file) { $MOJO_LISTEN .= ",https://*:443?cert=$cert_file&key=$key_file"; diff --git a/t/db-error-cleanup.pl b/t/db-error-cleanup.pl index cfbf8b7b2..da269ccbe 100644 --- a/t/db-error-cleanup.pl +++ b/t/db-error-cleanup.pl @@ -17,7 +17,7 @@ BEGIN { END { unlink('data/db/db_errors') } -use Bugzilla::Test::MockLocalconfig (urlbase => 'http://bmo-web.vm'); +use Bugzilla::Test::MockLocalconfig (urlbase => 'http://bmo.test'); use Bugzilla::Test::MockDB; use Test2::V0; use Test2::Tools::Exception qw(dies lives); diff --git a/t/markdown.t b/t/markdown.t index c4118a4fa..8fb3e071e 100644 --- a/t/markdown.t +++ b/t/markdown.t @@ -10,7 +10,7 @@ use warnings; use lib qw( . lib local/lib/perl5 ); use Bugzilla::Test::MockDB; -use Bugzilla::Test::MockLocalconfig urlbase => 'http://bmo-web.vm/'; +use Bugzilla::Test::MockLocalconfig urlbase => 'http://bmo.test/'; use Bugzilla::Test::MockParams (password_complexity => 'no_constraints'); use Mojo::DOM; use Bugzilla; diff --git a/t/mojo-example.t b/t/mojo-example.t index c9e104acf..fe58eac07 100644 --- a/t/mojo-example.t +++ b/t/mojo-example.t @@ -20,7 +20,7 @@ BEGIN { # this provides a default urlbase. # Most localconfig options the other Bugzilla::Test::Mock* modules take care for us. -use Bugzilla::Test::MockLocalconfig (urlbase => 'http://bmo-web.vm'); +use Bugzilla::Test::MockLocalconfig (urlbase => 'http://bmo.test'); # This configures an in-memory SQLite database. use Bugzilla::Test::MockDB;