-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose.yml
146 lines (138 loc) · 4.16 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: "3.8"
services:
scheduler:
image: ocurrent/ocluster-scheduler:live
command:
- --secrets-dir=/capnp-secrets
- --capnp-secret-key-file=/capnp-secrets/key.pem
- --capnp-listen-address=tcp:0.0.0.0:9000
- --capnp-public-address=tcp:scheduler:9000
- --pools=linux-x86_64
- --state-dir=/var/lib/ocluster-scheduler
- --default-clients=ocaml-docs-ci
init: true
ports:
- "9000:9000"
volumes:
- 'scheduler-data:/var/lib/ocluster-scheduler'
- 'capnp-secrets:/capnp-secrets'
worker:
# image: ocurrent/ocluster-worker:live
build:
dockerfile: docker/worker/Dockerfile
context: .
command:
- --connect=/capnp-secrets/pool-linux-x86_64.cap
- --name=ocluster-worker
- --allow-push=ocurrentbuilder/staging,ocurrent/opam-staging
- --capacity=1
- --state-dir=/var/lib/ocluster
- --obuilder-store=rsync:/var/cache/obuilder
- --rsync-mode=hardlink
- --obuilder-healthcheck=0
- --verbose
init: true
privileged: true # required for the Docker in Docker container to work
restart: on-failure # (wait for the scheduler to write the pool cap)
volumes:
- 'worker-data:/var/lib/ocluster'
- '/var/run/docker.sock:/var/run/docker.sock'
- 'capnp-secrets:/capnp-secrets:ro'
environment:
- DOCKER_BUILDKIT=1
- DOCKER_CLI_EXPERIMENTAL=enabled
init:
build:
dockerfile: docker/init/Dockerfile
context: .
environment:
- KEYFILE=/ssh/id_ed25519
- KEYTYPE=ed25519
volumes:
- 'ssh-credentials:/ssh/'
storage-server:
build:
dockerfile: docker/storage/Dockerfile
context: .
depends_on:
- "init"
ports:
- "2222:22"
volumes:
- 'ssh-credentials:/root/.ssh/'
- 'docs-data:/data'
http-raw-live-website:
restart: on-failure
image: nginx
command: >
bash -c "rm -rf /usr/share/nginx/html
&& ln -s /data/html-live/html-raw /usr/share/nginx/html
&& nginx -g 'daemon off;'"
ports:
- "8002:8000"
volumes:
- 'docs-data:/data/'
http-raw-current-website:
restart: on-failure
image: nginx
command: >
bash -c "rm -rf /usr/share/nginx/html
&& ln -s /data/html-current/html-raw /usr/share/nginx/html
&& nginx -g 'daemon off;'"
ports:
- "8003:8000"
volumes:
- 'docs-data:/data/'
ocaml-docs-ci:
# Use published docker container
# image: ocurrent/docs-ci:live
# Build from local sources
build:
dockerfile: Dockerfile
context: .
depends_on:
- "storage-server"
- "scheduler"
- "worker"
command:
- --confirm=above-average
- --ocluster-submission=/capnp-secrets/submit-ocaml-docs-ci.cap
- --ssh-host=172.17.0.1 # ocluster jobs are spawned by the host's docker, so they don't have
# access to this docker-compose's network. therefore we have to get
# to the storage server through the host network.
- --ssh-port=2222
- --ssh-user=root
- --ssh-privkey=/ssh/id_ed25519
- --ssh-pubkey=/ssh/id_ed25519.pub
- --ssh-folder=/data
# - --voodoo-repo="" # Voodoo repository to use
# - --voodoo-branch="" # Git branch from the voodoo repository
- --jobs=6
- --limit=1 # Only build the most recent version of each package
- --filter=capnp-rpc # NOTE Only build capnp-rpc documentation.
- --capnp-listen-address=tcp:0.0.0.0:9080
- --capnp-public-address=tcp:localhost:9080
- --migration-path=/migrations
init: true
restart: on-failure # (wait for the scheduler to write the submission cap)
ports:
- 9080:9080
- 8080:8080 # HTTP UI
volumes:
- 'ocaml-docs-ci-data:/var/lib/ocurrent'
- "capnp-secrets:/capnp-secrets"
- 'ssh-credentials:/ssh/'
environment:
- OCAMLRUNPARAM=b
- CI_PROFILE=dev
x-develop:
watch:
- action: rebuild
path: ./src
volumes:
ocaml-docs-ci-data:
worker-data:
scheduler-data:
capnp-secrets:
docs-data:
ssh-credentials: