This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstack.yml
153 lines (140 loc) · 3.54 KB
/
stack.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
147
148
149
150
151
152
153
version: '3.3'
volumes:
uploads-data:
session-data:
log-data:
queue-data:
jenkins-data:
artifacts-data:
secrets:
nginx.crt:
external: true
nginx.key:
external: true
jenkins.pass:
file: ./jenkins.pass
web.pass:
file: ./web.pass
services:
frontend:
build: ./frontend
image: "rhub/frontend:${RHUB_VERSION}"
environment:
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
- JENKINS_URL=http://${JENKINS_USER}:<password>@jenkins:8080/jenkins
- LOGDB_URL=${LOGDB_URL}
- MAILGUN_DOMAIN=${MAILGUN_DOMAIN}
- MAILGUN_API_KEY=${MAILGUN_API_KEY}
- RABBITMQ_URL=${RABBITMQ_URL}
- REDIS_URL=${REDIS_URL}
- REDIS_EMAIL_URL=${REDIS_EMAIL_URL}
- RHUB_ARTIFACTS_URL=${RHUB_ARTIFACTS_URL}
- RHUB_BUILDER_EXTERNAL_URL=${RHUB_BUILDER_EXTERNAL_URL}
- RHUB_BUILDER_URL=http://frontend:3000
- RHUB_EMAIL_FROM=${RHUB_EMAIL_FROM}
- RHUB_EMAIL_MODE=${RHUB_EMAIL_MODE}
- RHUB_SMTP_SERVER=${RHUB_SMTP_SERVER}
- RHUB_SMTP_USERNAME=${RHUB_SMTP_USERNAME}
- RHUB_SMTP_PASSWORD=${RHUB_SMTP_PASSWORD}
- RHUB_SMTP_PORT=${RHUB_SMTP_PORT}
- RHUB_SMTP_TLS_REQUIRED=${RHUB_SMTP_TLS_REQUIRED}
volumes:
- uploads-data:/usr/src/app/uploads
depends_on:
- redis
- queue
- logdb
- jenkins
secrets:
- jenkins.pass
backend:
build: ./backend
image: "rhub/backend:${RHUB_VERSION}"
environment:
- RABBITMQ_URL=${RABBITMQ_URL}
- JENKINS_URL=http://${JENKINS_USER}:<password>@jenkins:8080/jenkins
- RHUB_ARTIFACTS=${RHUB_ARTIFACTS}
depends_on:
- queue
- jenkins
secrets:
- jenkins.pass
redis:
image: "redis:4.0.11-alpine"
volumes:
- session-data:/data
queue:
image: "rabbitmq:3.7.8-alpine"
volumes:
- queue-data:/var/lib/rabbitmq
logdb:
image: "couchdb:2.2"
volumes:
- log-data:/opt/couchdb/data
logdb-seed:
build: ./seed
image: "rhub/seed:${RHUB_VERSION}"
environment:
- LOGDB_URL=${LOGDB_URL}
entrypoint:
- bash
- -c
- /seed/logdb.sh
depends_on:
- logdb
deploy:
restart_policy:
condition: on-failure
jenkins:
build: ./jenkins
image: "rhub/jenkins:${RHUB_VERSION}"
volumes:
- jenkins-data:/var/jenkins_home
environment:
- JENKINS_ROOT_URL=${JENKINS_ROOT_URL}
- JENKINS_USER=${JENKINS_USER}
- JENKINS_OPTS="--prefix=/jenkins"
secrets:
- jenkins.pass
ports:
- 50000:50000
linux-builder:
hostname: linux-builder
build: ./linux-builder
image: "rhub/linux-builder:${RHUB_VERSION}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- artifacts-data:/artifacts
environment:
- JENKINS_URL=http://jenkins:8080/jenkins
- JENKINS_USER=${JENKINS_USER}
- RHUB_EXECUTORS=4
- JENKINS_LABELS=swarm linux
- RHUB_CRAN_MIRROR=${RHUB_CRAN_MIRROR}
- RHUB_ARTIFACTS=${RHUB_ARTIFACTS}
- RHUB_BUILDER_URL=http://frontend:3000
secrets:
- jenkins.pass
cron:
build: ./cron
image: "rhub/cron:${RHUB_VERSION}"
environment:
- JENKINS_URL=http://${JENKINS_USER}:<password>@jenkins:8080/jenkins
secrets:
- jenkins.pass
nginx:
build: ./nginx
image: "rhub/nginx:${RHUB_VERSION}"
volumes:
- artifacts-data:/artifacts:ro
ports:
- "80:80"
- "443:443"
depends_on:
- frontend
- jenkins
entrypoint:
- sh
- -c
- /entrypoint.sh