mw docker custom
editcustom docker compose service sets
Synopsis
edit
Custom docker-compose services
editYou 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
editThis service will be accessible within the docker-compose
network to other services.
services:
<service-name>:
image: <service-image>
dns:
- ${NETWORK_SUBNET_PREFIX}.10
networks:
- dps
Example web service
editThis services will be accessible on your host machine via the virtual host specified.
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- mw docker - An advanced docker compose based development environment
- mw docker custom create - Create the containers
- mw docker custom destroy - Destroy the containers
- mw docker custom exec - Execute a command in the main container
- mw docker custom expose - Expose a port in a running container
- mw docker custom image - Interact with the image used for the service
- mw docker custom start - Start the containers
- mw docker custom stop - Stop the containers
- mw docker custom where - Outputs the path of the custom docker-compose yml file being used