-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (39 loc) · 1000 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: '3.2'
# This example starts a database, prepares some test data,
# runs some kind of test and finally shuts down the database
services:
test-database:
image: mariadb:latest
environment:
MARIADB_ROOT_PASSWORD: "ganzgeheim"
MARIADB_PASSWORD: "geheim"
MARIADB_USER: "testuser"
MARIADB_DATABASE: "testdb"
container_name: mytest
ports:
- "3306:3306"
prepare:
image: prepare:latest
build:
context: prepare
depends_on:
test-database:
condition: service_started
network_mode: service:test-database
test-app:
image: test-app
build:
context: testapp
depends_on:
prepare:
condition: service_completed_successfully
network_mode: service:test-database
shutdown:
image: shutdown:latest
build:
context: shutdown
depends_on:
test-app:
condition: service_completed_successfully
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"