< Cli < ref

mw docker custom

custom docker-compose service sets

Synopsis

Custom docker-compose services

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

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

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

  -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

  -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

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.