Skip to content

Commit bff5688

Browse files
committed
Update services documentation
1 parent 013dc30 commit bff5688

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

home/services.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,26 @@ Bazooka allows you to use external services (databases, messaging systems...) wi
44

55
Services are simply Docker containers that are linked with the container in which your build runs. This allows us to provide as many services as there are containers on the Docker Hub. It is also possible to use containers from your local Docker registry
66

7-
## Internals
7+
## Syntax
8+
9+
To declare Bazooka services for your build, you need to add the *services* attribute to your *.bazooka.yml* file. You can declare as many services as you want. Each service has two attributes:
10+
11+
* **image**: the name of the Docker image that will be used as a service. It can be an image from the docker hub, from a private registry, and optionnaly have a version
12+
* **alias (optional)**: the alias that will be used to link the container (see Docker documentation about container linking](https://docs.docker.com/userguide/dockerlinks/#container-linking) for more information on aliases). If alias is not specified, Bazooka will generate one from the name of the image, escaping unwanted characters such as *:* or *.*
813

9-
To explain how services work, we will start with an example
14+
Let's look at an example
1015

1116
```yaml
1217
services:
13-
- mongo
18+
- image: mongo
19+
- image: registry.mycompany.net/myteam/testservice:1.0.0
20+
alias: test
1421
```
1522
16-
Bazooka will parse the configuration file, register all the services declared, start the associated Docker containers, and link them at runtime with your build container. If this was done using the Docker CLI, it would give:
23+
24+
## Internals
25+
26+
When you declare services in your config file, Bazooka will parse the configuration file, start the associated Docker containers, and link them at runtime with your build container. If this was done using the Docker CLI, it would give:
1727
1828
```bash
1929
# Start all services

0 commit comments

Comments
 (0)