Cli/ref/mw docker custom

From mediawiki.org
< Cli‎ | ref

mw docker custom[edit]

custom docker-compose service sets

Synopsis[edit]

Custom docker-compose services[edit]

You can define one or more custom sets of docker-compose services. The default service set would be found in custom.yml, with additional service sets being prefixed with custom- such as custom-two.yml. These files should be created in the location returned by the mw docker custom where command.

Example internal service[edit]

This service will be accessible within the docker-compose network to other services.

version: '3.7'
services:
  <service-name>:
    image: <service-image>
    dns:
      - ${NETWORK_SUBNET_PREFIX}.10
    networks:
      - dps

Example web service[edit]

This services will be accessible on your host machine via the virtual host specified.

version: '3.7'
services:
  <service-name>:
    image: <service-image>
    environment:
      - VIRTUAL_HOST=<service-name>.mwdd.localhost,<service-name>.mwdd
      - VIRTUAL_PORT=<service-port>
    depends_on:
      - nginx-proxy
    dns:
      - ${NETWORK_SUBNET_PREFIX}.10
    networks:
      - dps

Note: If you use the docker hosts file integration, you may need to manually add this host to gain access.

Options[edit]

  -n, --name string   the name of the custom service file, referring to existing docker-compose .yml file in the mwdd directory prefixed with custom- (default "custom")

Options inherited from parent commands[edit]

  -c, --context string   The context to use (default "default")
      --help             Help for this command
      --no-interaction   Do not ask any interactive questions
  -v, --verbose count    Increase output verbosity. Example: --verbose=2 or -vv

SEE ALSO[edit]