/
docker-compose.yml
123 lines (116 loc) · 2.55 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
##
# BuildGrid's Docker Compose manifest.
#
# ¡FOR LOCAL DEVELOPMENT ONLY!
#
# Spins-up a 'local' grid instance:
# - Controller at http://localhost:50051
# - CAS + AC at: http://localhost:50052
#
# Basic usage:
# - docker-compose build
# - docker-compose up --scale bots=10
# - docker-compose down
# - docker volume inspect buildgrid_data
# - docker volume rm buildgrid_data
# - docker image rm buildgrid:local
#
version: "3.2"
services:
database:
image: postgres:latest
environment:
POSTGRES_USER: bgd
POSTGRES_PASSWORD: insecure
POSTGRES_DB: bgd
volumes:
- type: volume
source: db
target: /var/lib/postgresql/data
networks:
- backend
ports:
- "5432:5432"
storage:
build:
context: .
image: buildgrid:local
command: [
"server", "start", "-vvv",
"/app/config/storage.conf"]
volumes:
- type: volume
source: data
target: /var/lib/buildgrid/store
volume:
nocopy: true
- type: bind
source: ./data/config/storage.conf
target: /app/config/storage.conf
ports:
- "50052:50052"
networks:
- backend
- host
cache:
build:
context: .
image: buildgrid:local
command: [
"server", "start", "-vvv",
"/app/config/cache.conf"]
volumes:
- type: bind
source: ./data/config/cache.conf
target: /app/config/cache.conf
ports:
- "50053:50053"
networks:
- backend
- host
controller:
image: buildgrid:local
command: [
"server", "start", "-vvv",
"/app/config/controller.conf"]
volumes:
- type: bind
source: ./data/config/controller.conf
target: /app/config/controller.conf
ports:
- "50051:50051"
networks:
- backend
- host
bots: # To be scaled horizontaly
image: buildgrid:local
command: [
"bot", "--parent=",
"--remote=http://controller:50051",
"--remote-cas=http://storage:50052",
"host-tools"]
# "bot", "--parent=",
# "--remote=http://controller:50051",
# "--remote-cas=http://storage:50052",
# "buildbox",
# "--local-cas", "/var/lib/buildgrid/cache",
# "--fuse-dir", "/mnt"]
privileged: true
volumes:
- type: volume
source: cache
target: /var/lib/buildgrid/cache
- type: bind
source: ./data/bin
target: /app/tools
depends_on:
- controller
networks:
- backend
networks:
backend:
host:
volumes:
cache:
data:
db: