github.com/ddev/ddev@v1.23.2-0.20240519125000-d824ffe36ff3/pkg/ddevapp/templates.go (about)

     1  package ddevapp
     2  
     3  // ConfigInstructions is used to add example hooks usage
     4  const ConfigInstructions = `
     5  # Key features of DDEV's config.yaml:
     6  
     7  # name: <projectname> # Name of the project, automatically provides
     8  #   http://projectname.ddev.site and https://projectname.ddev.site
     9  
    10  # type: <projecttype>  # backdrop, craftcms, django4, drupal, drupal6, drupal7, laravel, magento, magento2, php, python, shopware6, silverstripe, typo3, wordpress
    11  # See https://ddev.readthedocs.io/en/stable/users/quickstart/ for more
    12  # information on the different project types
    13  # "drupal" covers recent Drupal 8+
    14  
    15  # docroot: <relative_path> # Relative path to the directory containing index.php.
    16  
    17  # php_version: "8.2"  # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"
    18  
    19  # You can explicitly specify the webimage but this
    20  # is not recommended, as the images are often closely tied to DDEV's' behavior,
    21  # so this can break upgrades.
    22  
    23  # webimage: <docker_image>  # nginx/php docker image.
    24  
    25  # database:
    26  #   type: <dbtype> # mysql, mariadb, postgres
    27  #   version: <version> # database version, like "10.11" or "8.0"
    28  #   MariaDB versions can be 5.5-10.8 and 10.11, MySQL versions can be 5.5-8.0
    29  #   PostgreSQL versions can be 9-16.
    30  
    31  # router_http_port: <port>  # Port to be used for http (defaults to global configuration, usually 80)
    32  # router_https_port: <port> # Port for https (defaults to global configuration, usually 443)
    33  
    34  # xdebug_enabled: false  # Set to true to enable Xdebug and "ddev start" or "ddev restart"
    35  # Note that for most people the commands
    36  # "ddev xdebug" to enable Xdebug and "ddev xdebug off" to disable it work better,
    37  # as leaving Xdebug enabled all the time is a big performance hit.
    38  
    39  # xhprof_enabled: false  # Set to true to enable Xhprof and "ddev start" or "ddev restart"
    40  # Note that for most people the commands
    41  # "ddev xhprof" to enable Xhprof and "ddev xhprof off" to disable it work better,
    42  # as leaving Xhprof enabled all the time is a big performance hit.
    43  
    44  # webserver_type: nginx-fpm, apache-fpm, or nginx-gunicorn
    45  
    46  # timezone: Europe/Berlin
    47  # This is the timezone used in the containers and by PHP;
    48  # it can be set to any valid timezone,
    49  # see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
    50  # For example Europe/Dublin or MST7MDT
    51  
    52  # composer_root: <relative_path>
    53  # Relative path to the Composer root directory from the project root. This is
    54  # the directory which contains the composer.json and where all Composer related
    55  # commands are executed.
    56  
    57  # composer_version: "2"
    58  # You can set it to "" or "2" (default) for Composer v2 or "1" for Composer v1
    59  # to use the latest major version available at the time your container is built.
    60  # It is also possible to use each other Composer version channel. This includes:
    61  #   - 2.2 (latest Composer LTS version)
    62  #   - stable
    63  #   - preview
    64  #   - snapshot
    65  # Alternatively, an explicit Composer version may be specified, for example "2.2.18".
    66  # To reinstall Composer after the image was built, run "ddev debug refresh".
    67  
    68  # nodejs_version: "20"
    69  # change from the default system Node.js version to any other version.
    70  # Numeric version numbers can be complete (i.e. 18.15.0) or
    71  # incomplete (18, 17.2, 16). 'lts' and 'latest' can be used as well along with
    72  # other named releases.
    73  # see https://www.npmjs.com/package/n#specifying-nodejs-versions
    74  # Note that you can continue using 'ddev nvm' or nvm inside the web container
    75  # to change the project's installed node version if you need to.
    76  
    77  # corepack_enable: false
    78  # Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm
    79  
    80  # additional_hostnames:
    81  #  - somename
    82  #  - someothername
    83  # would provide http and https URLs for "somename.ddev.site"
    84  # and "someothername.ddev.site".
    85  
    86  # additional_fqdns:
    87  #  - example.com
    88  #  - sub1.example.com
    89  # would provide http and https URLs for "example.com" and "sub1.example.com"
    90  # Please take care with this because it can cause great confusion.
    91  
    92  # upload_dirs: "custom/upload/dir"
    93  #
    94  # upload_dirs:
    95  #   - custom/upload/dir
    96  #   - ../private
    97  #
    98  # would set the destination paths for ddev import-files to <docroot>/custom/upload/dir
    99  # When Mutagen is enabled this path is bind-mounted so that all the files
   100  # in the upload_dirs don't have to be synced into Mutagen.
   101  
   102  # disable_upload_dirs_warning: false
   103  # If true, turns off the normal warning that says
   104  # "You have Mutagen enabled and your 'php' project type doesn't have upload_dirs set"
   105  
   106  # ddev_version_constraint: ""
   107  # Example:
   108  # ddev_version_constraint: ">= 1.22.4"
   109  # This will enforce that the running ddev version is within this constraint.
   110  # See https://github.com/Masterminds/semver#checking-version-constraints for
   111  # supported constraint formats
   112  
   113  # working_dir:
   114  #   web: /var/www/html
   115  #   db: /home
   116  # would set the default working directory for the web and db services.
   117  # These values specify the destination directory for ddev ssh and the
   118  # directory in which commands passed into ddev exec are run.
   119  
   120  # omit_containers: [db, ddev-ssh-agent]
   121  # Currently only these containers are supported. Some containers can also be
   122  # omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
   123  # the "db" container, several standard features of DDEV that access the
   124  # database container will be unusable. In the global configuration it is also
   125  # possible to omit ddev-router, but not here.
   126  
   127  # performance_mode: "global"
   128  # DDEV offers performance optimization strategies to improve the filesystem
   129  # performance depending on your host system. Should be configured globally.
   130  #
   131  # If set, will override the global config. Possible values are:
   132  #   - "global":  uses the value from the global config.
   133  #   - "none":    disables performance optimization for this project.
   134  #   - "mutagen": enables Mutagen for this project.
   135  #   - "nfs":     enables NFS for this project.
   136  #
   137  # See https://ddev.readthedocs.io/en/stable/users/install/performance/#nfs
   138  # See https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
   139  
   140  # fail_on_hook_fail: False
   141  # Decide whether 'ddev start' should be interrupted by a failing hook
   142  
   143  # host_https_port: "59002"
   144  # The host port binding for https can be explicitly specified. It is
   145  # dynamic unless otherwise specified.
   146  # This is not used by most people, most people use the *router* instead
   147  # of the localhost port.
   148  
   149  # host_webserver_port: "59001"
   150  # The host port binding for the ddev-webserver can be explicitly specified. It is
   151  # dynamic unless otherwise specified.
   152  # This is not used by most people, most people use the *router* instead
   153  # of the localhost port.
   154  
   155  # host_db_port: "59002"
   156  # The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
   157  # unless explicitly specified.
   158  
   159  # mailpit_http_port: "8025"
   160  # mailpit_https_port: "8026"
   161  # The Mailpit ports can be changed from the default 8025 and 8026
   162  
   163  # host_mailpit_port: "8025"
   164  # The mailpit port is not normally bound on the host at all, instead being routed
   165  # through ddev-router, but it can be bound directly to localhost if specified here.
   166  
   167  # webimage_extra_packages: [php7.4-tidy, php-bcmath]
   168  # Extra Debian packages that are needed in the webimage can be added here
   169  
   170  # dbimage_extra_packages: [telnet,netcat]
   171  # Extra Debian packages that are needed in the dbimage can be added here
   172  
   173  # use_dns_when_possible: true
   174  # If the host has internet access and the domain configured can
   175  # successfully be looked up, DNS will be used for hostname resolution
   176  # instead of editing /etc/hosts
   177  # Defaults to true
   178  
   179  # project_tld: ddev.site
   180  # The top-level domain used for project URLs
   181  # The default "ddev.site" allows DNS lookup via a wildcard
   182  # If you prefer you can change this to "ddev.local" to preserve
   183  # pre-v1.9 behavior.
   184  
   185  # ngrok_args: --basic-auth username:pass1234
   186  # Provide extra flags to the "ngrok http" command, see
   187  # https://ngrok.com/docs/ngrok-agent/config or run "ngrok http -h"
   188  
   189  # disable_settings_management: false
   190  # If true, DDEV will not create CMS-specific settings files like
   191  # Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php
   192  # In this case the user must provide all such settings.
   193  
   194  # You can inject environment variables into the web container with:
   195  # web_environment:
   196  # - SOMEENV=somevalue
   197  # - SOMEOTHERENV=someothervalue
   198  
   199  # no_project_mount: false
   200  # (Experimental) If true, DDEV will not mount the project into the web container;
   201  # the user is responsible for mounting it manually or via a script.
   202  # This is to enable experimentation with alternate file mounting strategies.
   203  # For advanced users only!
   204  
   205  # bind_all_interfaces: false
   206  # If true, host ports will be bound on all network interfaces,
   207  # not the localhost interface only. This means that ports
   208  # will be available on the local network if the host firewall
   209  # allows it.
   210  
   211  # default_container_timeout: 120
   212  # The default time that DDEV waits for all containers to become ready can be increased from
   213  # the default 120. This helps in importing huge databases, for example.
   214  
   215  #web_extra_exposed_ports:
   216  #- name: nodejs
   217  #  container_port: 3000
   218  #  http_port: 2999
   219  #  https_port: 3000
   220  #- name: something
   221  #  container_port: 4000
   222  #  https_port: 4000
   223  #  http_port: 3999
   224  # Allows a set of extra ports to be exposed via ddev-router
   225  # Fill in all three fields even if you don’t intend to use the https_port!
   226  # If you don’t add https_port, then it defaults to 0 and ddev-router will fail to start.
   227  #
   228  # The port behavior on the ddev-webserver must be arranged separately, for example
   229  # using web_extra_daemons.
   230  # For example, with a web app on port 3000 inside the container, this config would
   231  # expose that web app on https://<project>.ddev.site:9999 and http://<project>.ddev.site:9998
   232  # web_extra_exposed_ports:
   233  #  - name: myapp
   234  #    container_port: 3000
   235  #    http_port: 9998
   236  #    https_port: 9999
   237  
   238  #web_extra_daemons:
   239  #- name: "http-1"
   240  #  command: "/var/www/html/node_modules/.bin/http-server -p 3000"
   241  #  directory: /var/www/html
   242  #- name: "http-2"
   243  #  command: "/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000"
   244  #  directory: /var/www/html
   245  
   246  # override_config: false
   247  # By default, config.*.yaml files are *merged* into the configuration
   248  # But this means that some things can't be overridden
   249  # For example, if you have 'use_dns_when_possible: true'' you can't override it with a merge
   250  # and you can't erase existing hooks or all environment variables.
   251  # However, with "override_config: true" in a particular config.*.yaml file,
   252  # 'use_dns_when_possible: false' can override the existing values, and
   253  # hooks:
   254  #   post-start: []
   255  # or
   256  # web_environment: []
   257  # or
   258  # additional_hostnames: []
   259  # can have their intended affect. 'override_config' affects only behavior of the
   260  # config.*.yaml file it exists in.
   261  
   262  # Many DDEV commands can be extended to run tasks before or after the
   263  # DDEV command is executed, for example "post-start", "post-import-db",
   264  # "pre-composer", "post-composer"
   265  # See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
   266  # information on the commands that can be extended and the tasks you can define
   267  # for them. Example:
   268  #hooks:
   269  `
   270  
   271  // SequelproTemplate is the template for Sequelpro config.
   272  var SequelproTemplate = `<?xml version="1.0" encoding="UTF-8"?>
   273  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
   274  <plist version="1.0">
   275  <dict>
   276      <key>ContentFilters</key>
   277      <dict/>
   278      <key>auto_connect</key>
   279      <true/>
   280      <key>data</key>
   281      <dict>
   282          <key>connection</key>
   283          <dict>
   284              <key>database</key>
   285              <string>%s</string>
   286              <key>host</key>
   287              <string>%s</string>
   288              <key>name</key>
   289              <string>ddev/%s</string>
   290              <key>password</key>
   291              <string>%s</string>
   292              <key>port</key>
   293              <integer>%s</integer>
   294              <key>rdbms_type</key>
   295              <string>mysql</string>
   296              <key>sslCACertFileLocation</key>
   297              <string></string>
   298              <key>sslCACertFileLocationEnabled</key>
   299              <integer>0</integer>
   300              <key>sslCertificateFileLocation</key>
   301              <string></string>
   302              <key>sslCertificateFileLocationEnabled</key>
   303              <integer>0</integer>
   304              <key>sslKeyFileLocation</key>
   305              <string></string>
   306              <key>sslKeyFileLocationEnabled</key>
   307              <integer>0</integer>
   308              <key>type</key>
   309              <string>SPTCPIPConnection</string>
   310              <key>useSSL</key>
   311              <integer>0</integer>
   312              <key>user</key>
   313              <string>%s</string>
   314          </dict>
   315      </dict>
   316      <key>encrypted</key>
   317      <false/>
   318      <key>format</key>
   319      <string>connection</string>
   320      <key>queryFavorites</key>
   321      <array/>
   322      <key>queryHistory</key>
   323      <array/>
   324      <key>rdbms_type</key>
   325      <string>mysql</string>
   326      <key>rdbms_version</key>
   327      <string>5.5.44</string>
   328      <key>version</key>
   329      <integer>1</integer>
   330  </dict>
   331  </plist>`