##// END OF EJS Templates
rcstack: use dl server
super-admin -
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -1,393 +1,393 b''
1 # RhodeCode Cluster
1 # RhodeCode Cluster
2
2
3 RhodeCode Cluster is a multi-node highly-scalable setup to run
3 RhodeCode Cluster is a multi-node highly-scalable setup to run
4 RhodeCode, Edge Router(Traefik + SSL) and Metrics Stack (Prometheus, Loki, Grafana) and
4 RhodeCode, Edge Router(Traefik + SSL) and Metrics Stack (Prometheus, Loki, Grafana) and
5 all its additional components in single environment using Docker.
5 all its additional components in single environment using Docker.
6
6
7 Using a docker-compose this setup creates following services for RhodeCode:
7 Using a docker-compose this setup creates following services for RhodeCode:
8
8
9 Edge-Router:
9 Edge-Router:
10
10
11 - Traefik, Edge Router, SSL termination etc
11 - Traefik, Edge Router, SSL termination etc
12
12
13 Core Services:
13 Core Services:
14
14
15 - Database (defaults to PostgreSQL)
15 - Database (defaults to PostgreSQL)
16 - Redis, acts as cache and queue exchange
16 - Redis, acts as cache and queue exchange
17 - ChannelStream - live websocket communications
17 - ChannelStream - live websocket communications
18 - Nginx (static/channelstream) proxy serving RhodeCode static files and channelstream communication
18 - Nginx (static/channelstream) proxy serving RhodeCode static files and channelstream communication
19 - Elasticsearch (full text search backend)
19 - Elasticsearch (full text search backend)
20
20
21 RhodeCode
21 RhodeCode
22
22
23 - RhodeCode CE/EE
23 - RhodeCode CE/EE
24 - VCSServer for GIT/SVN/HG support
24 - VCSServer for GIT/SVN/HG support
25 - SSH Server for cloning over SSH
25 - SSH Server for cloning over SSH
26 - SVN webserver for HTTP support over SVN
26 - SVN webserver for HTTP support over SVN
27 - Celery workers for asynchronous tasks
27 - Celery workers for asynchronous tasks
28 - Celery beat for automation tasks
28 - Celery beat for automation tasks
29
29
30 Metrics
30 Metrics
31
31
32 - Loki, logs aggregation
32 - Loki, logs aggregation
33 - Grafana, metrics Dashboard
33 - Grafana, metrics Dashboard
34 - Prometheus, metrics time-series
34 - Prometheus, metrics time-series
35 - Statsd-exporter - statsd to Prometheus bridge
35 - Statsd-exporter - statsd to Prometheus bridge
36 - Node-exporter - machine stats and usage
36 - Node-exporter - machine stats and usage
37 - Promtail - log scraping
37 - Promtail - log scraping
38
38
39 ##rcstack for Linux, new docker based installer
39 ##rcstack for Linux, new docker based installer
40
40
41 To get started with RhodeCode get the new shell installer called rcstack
41 To get started with RhodeCode get the new shell installer called rcstack
42
42
43 ```
43 ```
44 mkdir docker-rhodecode && cd docker-rhodecode
44 mkdir docker-rhodecode && cd docker-rhodecode
45 curl -s -o rcstack https://code.rhodecode.com/rhodecode-enterprise-docker/raw/master/scripts/rcstack/rcstack && chmod +x rcstack
45 curl -L -s -o rcstack https://dls.rhodecode.com/get/master && chmod +x rcstack
46 ./rcstack get-started
46 ./rcstack get-started
47 ```
47 ```
48
48
49 ## Pre requisites
49 ## Pre requisites
50
50
51 To Run this stack Docker engine and Docker Compose needs to be installed on the host machine.
51 To Run this stack Docker engine and Docker Compose needs to be installed on the host machine.
52 Please run `./rcstack init` to install docker using the installer, or
52 Please run `./rcstack init` to install docker using the installer, or
53 visit docker site and install docker (min version 20.10) and docker compose:
53 visit docker site and install docker (min version 20.10) and docker compose:
54
54
55 - https://docs.docker.com/engine/install/
55 - https://docs.docker.com/engine/install/
56 - https://docs.docker.com/compose/install/
56 - https://docs.docker.com/compose/install/
57
57
58 ./rcstack init can install docker on linux machine, but if manual installation is
58 ./rcstack init can install docker on linux machine, but if manual installation is
59 required it's also possible by simply installing docker before
59 required it's also possible by simply installing docker before
60
60
61
61
62
62
63 # Quick install tutorial
63 # Quick install tutorial
64
64
65 Those are step-by-step installation/run steps.
65 Those are step-by-step installation/run steps.
66
66
67 create configurations / docker definitions:
67 create configurations / docker definitions:
68
68
69 ./rcstack init
69 ./rcstack init
70
70
71 At this point a custom file under .custom/.runtime.env was created. Adjust it if required.
71 At this point a custom file under .custom/.runtime.env was created. Adjust it if required.
72
72
73 Start Traefik router that would handle all incoming traffic, load balance. A valid domain needs to be present in
73 Start Traefik router that would handle all incoming traffic, load balance. A valid domain needs to be present in
74 .custom/.runtime.env to access the RhodeCOde
74 .custom/.runtime.env to access the RhodeCOde
75
75
76 ./rcstack stack router up --detach
76 ./rcstack stack router up --detach
77
77
78 Start the database and bootstrap it
78 Start the database and bootstrap it
79
79
80 ./rcontrol stack database up --detach
80 ./rcontrol stack database up --detach
81
81
82 Start other services required
82 Start other services required
83
83
84 ./rcstack stack services up --detach
84 ./rcstack stack services up --detach
85
85
86 Start RhodeCode stack
86 Start RhodeCode stack
87
87
88 ./rcstack stack rhodecode up --detach
88 ./rcstack stack rhodecode up --detach
89
89
90 Check stack status
90 Check stack status
91
91
92 ./rcstack status
92 ./rcstack status
93
93
94 Output should look similar like this:
94 Output should look similar like this:
95
95
96 ---
96 ---
97 CONTAINER ID IMAGE STATUS NAMES PORTS
97 CONTAINER ID IMAGE STATUS NAMES PORTS
98 ef54fc528e3a traefik:v2.9.5 Up 2 hours rc_cluster_router-traefik-1 0.0.0.0:80->80/tcp, :::80->80/tcp
98 ef54fc528e3a traefik:v2.9.5 Up 2 hours rc_cluster_router-traefik-1 0.0.0.0:80->80/tcp, :::80->80/tcp
99 f3ea0539e8b0 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-rhodecode-1 0.0.0.0:10020->10020/tcp, :::10020->10020/tcp
99 f3ea0539e8b0 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-rhodecode-1 0.0.0.0:10020->10020/tcp, :::10020->10020/tcp
100 2be52ba58ffe rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-vcsserver-1
100 2be52ba58ffe rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-vcsserver-1
101 7cd730ad3263 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-1
101 7cd730ad3263 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-1
102 dfa231342c87 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-beat-1
102 dfa231342c87 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-celery-beat-1
103 d3d76ce2de96 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-sshd-1
103 d3d76ce2de96 rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-sshd-1
104 daaac329414b rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-svn-1
104 daaac329414b rhodecode/rhodecode-ee:4.28.0 Up 2 hours (healthy) rc_cluster_apps-svn-1
105 7b8504fb9acb nginx:1.23.2 Up 2 hours (healthy) rc_cluster_services-nginx-1 80/tcp
105 7b8504fb9acb nginx:1.23.2 Up 2 hours (healthy) rc_cluster_services-nginx-1 80/tcp
106 7279c25feb6b elasticsearch:6.8.23 Up 2 hours (healthy) rc_cluster_services-elasticsearch-1 9200/tcp, 9300/tcp
106 7279c25feb6b elasticsearch:6.8.23 Up 2 hours (healthy) rc_cluster_services-elasticsearch-1 9200/tcp, 9300/tcp
107 19fb93587493 redis:7.0.5 Up 2 hours (healthy) rc_cluster_services-redis-1 6379/tcp
107 19fb93587493 redis:7.0.5 Up 2 hours (healthy) rc_cluster_services-redis-1 6379/tcp
108 fb77fb6496c6 channelstream/channelstream:0.7.1 Up 2 hours (healthy) rc_cluster_services-channelstream-1 8000/tcp
108 fb77fb6496c6 channelstream/channelstream:0.7.1 Up 2 hours (healthy) rc_cluster_services-channelstream-1 8000/tcp
109 cb6c5c022f5b postgres:14.6 Up 2 hours (healthy) rc_cluster_services-database-1 5432/tcp
109 cb6c5c022f5b postgres:14.6 Up 2 hours (healthy) rc_cluster_services-database-1 5432/tcp
110
110
111 # Standalone cluster build from installer
111 # Standalone cluster build from installer
112
112
113 If you;d like to build your own custom image here's a quick how to.:
113 If you;d like to build your own custom image here's a quick how to.:
114 Follow these steps to build and run the RhodeCode Cluster via Docker-compose.
114 Follow these steps to build and run the RhodeCode Cluster via Docker-compose.
115
115
116 1) Run:
116 1) Run:
117
117
118 ./rcstack init
118 ./rcstack init
119
119
120 2) Run artifacts fetch like installer and certain needed build binaries:
120 2) Run artifacts fetch like installer and certain needed build binaries:
121
121
122 Start by fetching required installer binaries. This is required to create both
122 Start by fetching required installer binaries. This is required to create both
123 simple build and full compose setup.
123 simple build and full compose setup.
124 Please use the `--version-name VERSION_NAME` flag to adjust RhodeCode version if needed.
124 Please use the `--version-name VERSION_NAME` flag to adjust RhodeCode version if needed.
125 (e.g. --version-name "4.24.1")
125 (e.g. --version-name "4.24.1")
126
126
127 ```
127 ```
128 ./rcstack get-build-artifacts
128 ./rcstack get-build-artifacts
129 ```
129 ```
130
130
131 This will download required installer files and put them into the `.cache` directory.
131 This will download required installer files and put them into the `.cache` directory.
132 This directory should look similar to that after downloads have finish:
132 This directory should look similar to that after downloads have finish:
133
133
134 ```
134 ```
135 drwxr-xr-x 8 rcdev rcdev 256B Feb 8 13:35 .
135 drwxr-xr-x 8 rcdev rcdev 256B Feb 8 13:35 .
136 drwxr-xr-x 14 rcdev rcdev 448B Feb 8 10:40 ..
136 drwxr-xr-x 14 rcdev rcdev 448B Feb 8 10:40 ..
137 -rw-r--r-- 1 rcdev rcdev 0B Feb 8 20:44 .dirkeep
137 -rw-r--r-- 1 rcdev rcdev 0B Feb 8 20:44 .dirkeep
138 -rwxr-xr-x 1 rcdev rcdev 241M Feb 8 13:35 RhodeCode-installer-linux-build20210208_0800
138 -rwxr-xr-x 1 rcdev rcdev 241M Feb 8 13:35 RhodeCode-installer-linux-build20210208_0800
139 -rw-r--r-- 1 rcdev rcdev 156M Feb 8 13:35 RhodeCodeCommunity-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
139 -rw-r--r-- 1 rcdev rcdev 156M Feb 8 13:35 RhodeCodeCommunity-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
140 -rw-r--r-- 1 rcdev rcdev 171M Feb 8 13:35 RhodeCodeEnterprise-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
140 -rw-r--r-- 1 rcdev rcdev 171M Feb 8 13:35 RhodeCodeEnterprise-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
141 -rw-r--r-- 1 rcdev rcdev 145M Feb 8 13:35 RhodeCodeVCSServer-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
141 -rw-r--r-- 1 rcdev rcdev 145M Feb 8 13:35 RhodeCodeVCSServer-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
142 -rw-r--r-- 1 rcdev rcdev 109M Feb 8 13:35 locale-archive
142 -rw-r--r-- 1 rcdev rcdev 109M Feb 8 13:35 locale-archive
143 ```
143 ```
144
144
145
145
146 3) Create the build
146 3) Create the build
147
147
148 ./rcstack build-installer
148 ./rcstack build-installer
149
149
150 # Standalone cluster build from source code
150 # Standalone cluster build from source code
151
151
152 There's an option to build the latest release from the source code as a docker installation.
152 There's an option to build the latest release from the source code as a docker installation.
153 If you;d like to build your own custom image based on the source code here's a quick how to.:
153 If you;d like to build your own custom image based on the source code here's a quick how to.:
154 Follow these steps to build and run the RhodeCode Cluster via Docker-compose.
154 Follow these steps to build and run the RhodeCode Cluster via Docker-compose.
155
155
156 1) Run init to setup needed docker env and files:
156 1) Run init to setup needed docker env and files:
157
157
158 ./rcstack init
158 ./rcstack init
159
159
160 2) Run artifacts fetch like installer and certain needed build binaries:
160 2) Run artifacts fetch like installer and certain needed build binaries:
161
161
162 Start by fetching required installer binaries.
162 Start by fetching required installer binaries.
163 Only local-archive is required to be present, installer is disregarded for source build
163 Only local-archive is required to be present, installer is disregarded for source build
164
164
165 ```
165 ```
166 ./rcstack get-build-artifacts
166 ./rcstack get-build-artifacts
167 ```
167 ```
168
168
169 This will download required installer files and put them into the `.cache` directory.
169 This will download required installer files and put them into the `.cache` directory.
170 This directory should look similar to that after downloads have finish:
170 This directory should look similar to that after downloads have finish:
171
171
172 ```
172 ```
173 drwxr-xr-x 8 rcdev rcdev 256B Feb 8 13:35 .
173 drwxr-xr-x 8 rcdev rcdev 256B Feb 8 13:35 .
174 drwxr-xr-x 14 rcdev rcdev 448B Feb 8 10:40 ..
174 drwxr-xr-x 14 rcdev rcdev 448B Feb 8 10:40 ..
175 -rw-r--r-- 1 rcdev rcdev 0B Feb 8 20:44 .dirkeep
175 -rw-r--r-- 1 rcdev rcdev 0B Feb 8 20:44 .dirkeep
176 -rwxr-xr-x 1 rcdev rcdev 241M Feb 8 13:35 RhodeCode-installer-linux-build20210208_0800
176 -rwxr-xr-x 1 rcdev rcdev 241M Feb 8 13:35 RhodeCode-installer-linux-build20210208_0800
177 -rw-r--r-- 1 rcdev rcdev 156M Feb 8 13:35 RhodeCodeCommunity-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
177 -rw-r--r-- 1 rcdev rcdev 156M Feb 8 13:35 RhodeCodeCommunity-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
178 -rw-r--r-- 1 rcdev rcdev 171M Feb 8 13:35 RhodeCodeEnterprise-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
178 -rw-r--r-- 1 rcdev rcdev 171M Feb 8 13:35 RhodeCodeEnterprise-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
179 -rw-r--r-- 1 rcdev rcdev 145M Feb 8 13:35 RhodeCodeVCSServer-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
179 -rw-r--r-- 1 rcdev rcdev 145M Feb 8 13:35 RhodeCodeVCSServer-4.24.1+x86_64-linux_build20210208_0800.tar.bz2
180 -rw-r--r-- 1 rcdev rcdev 109M Feb 8 13:35 locale-archive
180 -rw-r--r-- 1 rcdev rcdev 109M Feb 8 13:35 locale-archive
181 ```
181 ```
182
182
183 3) get source code needed to create a build
183 3) get source code needed to create a build
184
184
185 This step will create source code copies into the `.source/` path. So it will look like this:
185 This step will create source code copies into the `.source/` path. So it will look like this:
186
186
187 ```
187 ```
188 -rw-r--r-- 1 docker docker 0 Nov 25 12:27 .dirkeep
188 -rw-r--r-- 1 docker docker 0 Nov 25 12:27 .dirkeep
189 drwxr-xr-x 1 docker docker 1184 Nov 25 12:27 rhodecode-enterprise-ce
189 drwxr-xr-x 1 docker docker 1184 Nov 25 12:27 rhodecode-enterprise-ce
190 drwxr-xr-x 1 docker docker 1120 Nov 25 12:27 rhodecode-enterprise-ee
190 drwxr-xr-x 1 docker docker 1120 Nov 25 12:27 rhodecode-enterprise-ee
191 drwxr-xr-x 1 docker docker 800 Nov 25 12:27 rhodecode-vcsserver
191 drwxr-xr-x 1 docker docker 800 Nov 25 12:27 rhodecode-vcsserver
192 ```
192 ```
193
193
194 If you have the 3 required projects source code already, this step can be omitted, and the
194 If you have the 3 required projects source code already, this step can be omitted, and the
195 sources can be copied to the `.source/` directory. note: symlinks don't work.
195 sources can be copied to the `.source/` directory. note: symlinks don't work.
196
196
197 - https://code.rhodecode.com/rhodecode-vcsserver
197 - https://code.rhodecode.com/rhodecode-vcsserver
198 - https://code.rhodecode.com/rhodecode-enterprise-ce
198 - https://code.rhodecode.com/rhodecode-enterprise-ce
199 - https://code.rhodecode.com/rhodecode-enterprise-ee (assuming access is granted to this)
199 - https://code.rhodecode.com/rhodecode-enterprise-ee (assuming access is granted to this)
200
200
201 Run this to fetch the sources
201 Run this to fetch the sources
202
202
203 ```
203 ```
204 ./rcstack get-build-source --revision=default --auth-token=xxxx --server-url=https://code.rhodecode.com/sources
204 ./rcstack get-build-source --revision=default --auth-token=xxxx --server-url=https://code.rhodecode.com/sources
205 ```
205 ```
206
206
207
207
208 4) Create the build
208 4) Create the build
209
209
210 ```
210 ```
211 ./rcstack build-source --version-name 4.28.0.REL.2022.12.12
211 ./rcstack build-source --version-name 4.28.0.REL.2022.12.12
212 ```
212 ```
213
213
214 # Operation
214 # Operation
215
215
216 ## Data structure
216 ## Data structure
217
217
218 There are 4 volumes defined:
218 There are 4 volumes defined:
219
219
220
220
221 - `/etc/rhodecode/conf`
221 - `/etc/rhodecode/conf`
222
222
223 Shared volume used for configuration files for rhodecode, vcsserver and supervisord, and some cache data
223 Shared volume used for configuration files for rhodecode, vcsserver and supervisord, and some cache data
224
224
225 - `/var/opt/rhodecode_repo_store`
225 - `/var/opt/rhodecode_repo_store`
226
226
227 Used for main repository storage where repositories would be stored
227 Used for main repository storage where repositories would be stored
228
228
229 - `/var/opt/rhodecode_data`
229 - `/var/opt/rhodecode_data`
230
230
231 Data dir for rhodecode cache/lock files, or user sessions (for file backend)
231 Data dir for rhodecode cache/lock files, or user sessions (for file backend)
232
232
233
233
234 ## Set License for EE version
234 ## Set License for EE version
235
235
236 In order to install EE edition a license file is required to be present.
236 In order to install EE edition a license file is required to be present.
237 It can contain your current license, or when empty license can be applied via Web interface.
237 It can contain your current license, or when empty license can be applied via Web interface.
238
238
239 To apply it during build phase save your raw license data into a file
239 To apply it during build phase save your raw license data into a file
240
240
241 `config/rhodecode_enterprise.license`
241 `config/rhodecode_enterprise.license`
242
242
243 If this file is present build phase will read it and license will be applied at creation.
243 If this file is present build phase will read it and license will be applied at creation.
244 This file can also be empty and license can be applied via a WEB interface after first login.
244 This file can also be empty and license can be applied via a WEB interface after first login.
245
245
246 ## Run Docker compose build:
246 ## Run Docker compose build:
247
247
248 *This will build RhodeCode based on downloaded installer packages.*
248 *This will build RhodeCode based on downloaded installer packages.*
249
249
250 To create a full stack we need to run the database container, so it's ready to
250 To create a full stack we need to run the database container, so it's ready to
251 build the docker image.
251 build the docker image.
252
252
253 _Disk space problems?_
253 _Disk space problems?_
254
254
255 ```
255 ```
256 docker system df
256 docker system df
257 docker builder prune -f
257 docker builder prune -f
258 # optionally
258 # optionally
259 docker image prune -a
259 docker image prune -a
260 ```
260 ```
261
261
262 ### Creating & building images
262 ### Creating & building images
263
263
264 1) start with running the required database for the build stage in the background.
264 1) start with running the required database for the build stage in the background.
265
265
266 ```
266 ```
267 docker-compose up --detach database
267 docker-compose up --detach database
268 ```
268 ```
269
269
270 This will start our postgres database, and expose it to the network.
270 This will start our postgres database, and expose it to the network.
271 Postgres DB is configured to output logs into a stdout
271 Postgres DB is configured to output logs into a stdout
272
272
273 2) We can now run the full installation. Database needs to be running for the next build command.
273 2) We can now run the full installation. Database needs to be running for the next build command.
274 This will build the rhodecode base image used for rhodecode, vcsserver, celery, ssh, svn
274 This will build the rhodecode base image used for rhodecode, vcsserver, celery, ssh, svn
275 Then it will build all other components required.
275 Then it will build all other components required.
276
276
277 ```
277 ```
278 docker-compose build rhodecode
278 docker-compose build rhodecode
279 docker-compose build
279 docker-compose build
280 ```
280 ```
281
281
282 4) Once we build all required containers, we can run the whole stack using `docker-compose up`
282 4) Once we build all required containers, we can run the whole stack using `docker-compose up`
283
283
284 ```
284 ```
285 docker-compose up
285 docker-compose up
286 ```
286 ```
287
287
288 If running locally you can access Running RhodeCode via Nginx under:
288 If running locally you can access Running RhodeCode via Nginx under:
289 http://localhost:8888
289 http://localhost:8888
290
290
291 localhost can be changed to the server IP where docker is running.
291 localhost can be changed to the server IP where docker is running.
292
292
293
293
294 In case for bigger setups docker-compose can scale more rhodecode/vcsserver workers:
294 In case for bigger setups docker-compose can scale more rhodecode/vcsserver workers:
295
295
296 ```
296 ```
297 docker-compose up --scale vcsserver=3 rhodecode=3
297 docker-compose up --scale vcsserver=3 rhodecode=3
298 ```
298 ```
299
299
300 Logging is pushed to stdout from all services.
300 Logging is pushed to stdout from all services.
301
301
302
302
303 ### Upgrade procedure:
303 ### Upgrade procedure:
304
304
305 - run ./rcstack self-update
305 - run ./rcstack self-update
306 - run ./rcstack stack-upgrade to get upgrade instructions
306 - run ./rcstack stack-upgrade to get upgrade instructions
307
307
308
308
309 With this done, you can now proceed with every step of normal source installation (Creating & building images), but instead of using
309 With this done, you can now proceed with every step of normal source installation (Creating & building images), but instead of using
310 just `docker-compose` command it needs to be replaced with `docker-compose -f docker-compose.yaml -f docker-compose.source.yaml`
310 just `docker-compose` command it needs to be replaced with `docker-compose -f docker-compose.yaml -f docker-compose.source.yaml`
311
311
312 For example to override the installer build with the source `rhodecode` based image, and also setting proper version, run:
312 For example to override the installer build with the source `rhodecode` based image, and also setting proper version, run:
313
313
314 ```
314 ```
315 RC_VERSION="4.28.0.SRC.2022.12.12.1" docker-compose -f docker-compose-apps.yaml -f docker-compose.source.yaml build --no-cache --progress=plain rhodecode
315 RC_VERSION="4.28.0.SRC.2022.12.12.1" docker-compose -f docker-compose-apps.yaml -f docker-compose.source.yaml build --no-cache --progress=plain rhodecode
316 ```
316 ```
317
317
318 NOTE THAT it's recommended to keep rc_version and source_Ver the same
318 NOTE THAT it's recommended to keep rc_version and source_Ver the same
319
319
320 ## Simple community build
320 ## Simple community build
321
321
322 Build docker RhodeCode `Community` without any dependencies (redis, external db) using
322 Build docker RhodeCode `Community` without any dependencies (redis, external db) using
323 simple sqlite database and file based caches.
323 simple sqlite database and file based caches.
324 This is a fully running instance good for small use with 3-5 users.
324 This is a fully running instance good for small use with 3-5 users.
325
325
326 ```
326 ```
327 docker build -t rhodecode/rhodecode-ce:4.23.2 -f rhodecode.dockerfile \
327 docker build -t rhodecode/rhodecode-ce:4.23.2 -f rhodecode.dockerfile \
328 -e RHODECODE_TYPE=Community \
328 -e RHODECODE_TYPE=Community \
329 -e RHODECODE_VERSION=4.23.2 \
329 -e RHODECODE_VERSION=4.23.2 \
330 -e RHODECODE_DB=sqlite \
330 -e RHODECODE_DB=sqlite \
331 -e RHODECODE_USER_NAME=admin \
331 -e RHODECODE_USER_NAME=admin \
332 -e RHODECODE_USER_PASS=secret4 \
332 -e RHODECODE_USER_PASS=secret4 \
333 -e RHODECODE_USER_EMAIL=support@rhodecode.com \
333 -e RHODECODE_USER_EMAIL=support@rhodecode.com \
334 .
334 .
335 ```
335 ```
336
336
337 note: for debugging better to add `--progress plain` into the build command to obtain all the output from the build.
337 note: for debugging better to add `--progress plain` into the build command to obtain all the output from the build.
338 To Build against existing running Postgres or MySQL you can specify:
338 To Build against existing running Postgres or MySQL you can specify:
339
339
340 --build-arg RHODECODE_DB=postgresql://postgres:secret@database/rhodecode
340 --build-arg RHODECODE_DB=postgresql://postgres:secret@database/rhodecode
341 --build-arg RHODECODE_DB=mysql://root:secret@localhost/rhodecode?charset=utf8
341 --build-arg RHODECODE_DB=mysql://root:secret@localhost/rhodecode?charset=utf8
342
342
343
343
344 To copy over the data into volumes use such command:
344 To copy over the data into volumes use such command:
345 ```
345 ```
346 docker run -v logvolume:/data --name data_vol busybox true
346 docker run -v logvolume:/data --name data_vol busybox true
347 docker cp . data_vol:/data
347 docker cp . data_vol:/data
348 docker rm data_vol
348 docker rm data_vol
349 ```
349 ```
350
350
351 Run the container, mounting the required volumes. By default the application would be
351 Run the container, mounting the required volumes. By default the application would be
352 available at http://localhost:10020, and default login is (unless specified differently in the build command)
352 available at http://localhost:10020, and default login is (unless specified differently in the build command)
353
353
354 ```
354 ```
355 user: admin
355 user: admin
356 password: secret4
356 password: secret4
357 ```
357 ```
358
358
359 We've not built our image using specific version. It's time to run it:
359 We've not built our image using specific version. It's time to run it:
360 We specify the run.ini by selecting config option we have locally
360 We specify the run.ini by selecting config option we have locally
361
361
362 ```
362 ```
363 docker run \
363 docker run \
364 --name rhodecode-container \
364 --name rhodecode-container \
365 --publish 10020:10020 \
365 --publish 10020:10020 \
366 --restart unless-stopped \
366 --restart unless-stopped \
367 --volume $PWD/config:/etc/rhodecode/conf \
367 --volume $PWD/config:/etc/rhodecode/conf \
368 --volume $PWD/config/rhodecode.ini:/etc/rhodecode/conf_build/rhodecode.ini \
368 --volume $PWD/config/rhodecode.ini:/etc/rhodecode/conf_build/rhodecode.ini \
369 'rhodecode/rhodecode-ee:4.23.2'
369 'rhodecode/rhodecode-ee:4.23.2'
370 ```
370 ```
371
371
372 Enter container
372 Enter container
373
373
374 ```
374 ```
375 docker exec -it rhodecode-container /bin/bash
375 docker exec -it rhodecode-container /bin/bash
376 ```
376 ```
377
377
378 Enter interactive shell
378 Enter interactive shell
379
379
380 ```
380 ```
381 docker exec -it rhodecode-container /usr/local/bin/rhodecode_bin/bin/rc-ishell /etc/rhodecode/conf/rhodecode.ini
381 docker exec -it rhodecode-container /usr/local/bin/rhodecode_bin/bin/rc-ishell /etc/rhodecode/conf/rhodecode.ini
382 ```
382 ```
383
383
384 Run Database migrations
384 Run Database migrations
385 ```
385 ```
386 docker exec -it rhodecode-container /usr/local/bin/rhodecode_bin/bin/rc-upgrade-db /etc/rhodecode/conf/rhodecode.ini --force-yes
386 docker exec -it rhodecode-container /usr/local/bin/rhodecode_bin/bin/rc-upgrade-db /etc/rhodecode/conf/rhodecode.ini --force-yes
387 ```
387 ```
388
388
389
389
390
390
391 ### Registry for docker swarm
391 ### Registry for docker swarm
392
392
393 docker run -d -p 5000:5000 --restart always --name registry registry:2 No newline at end of file
393 docker run -d -p 5000:5000 --restart always --name registry registry:2
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now