##// END OF EJS Templates
docker: updated to 4.25.0
marcink -
r4:ac5de1d0
parent child Browse files
Show More
@@ -4,6 +4,8 b" IFS=$'\\n\\t'"
4 # e.g 4.24.1
4 # e.g 4.24.1
5 source ../.env
5 source ../.env
6 VER=$RC_VERSION
6 VER=$RC_VERSION
7 AUTH=""
8
7 INSTALLER_URL=https://dls.rhodecode.com/dls/N2E2ZTY1NzA3NjYxNDA2NTc1NjI3MTcyNzA2MjcxNzIyZTcwNjI3YQ==/rhodecode-control/latest-linux-ee
9 INSTALLER_URL=https://dls.rhodecode.com/dls/N2E2ZTY1NzA3NjYxNDA2NTc1NjI3MTcyNzA2MjcxNzIyZTcwNjI3YQ==/rhodecode-control/latest-linux-ee
8
10
9 echo "Downloading Artifacts for version: $VER"
11 echo "Downloading Artifacts for version: $VER"
@@ -12,6 +14,8 b' MANIFEST=https://dls.rhodecode.com/linux/MANIFEST'
12 CACHE_DIR=../.cache
14 CACHE_DIR=../.cache
13 VER_REGEX="$VER+x86_64"
15 VER_REGEX="$VER+x86_64"
14
16
17 echo "Downloading Artifacts for version: $VER"
18
15 echo "Downloading locale-archive"
19 echo "Downloading locale-archive"
16 curl -L https://dls.rhodecode.com/assets/locale-archive -J -O
20 curl -L https://dls.rhodecode.com/assets/locale-archive -J -O
17 mv -v locale-archive $CACHE_DIR
21 mv -v locale-archive $CACHE_DIR
@@ -23,7 +27,8 b' echo "Found following $ARTS"'
23
27
24 for url in $ARTS; do
28 for url in $ARTS; do
25 echo "Downloading $url"
29 echo "Downloading $url"
26 curl -L ${url} -J -O
30 curl $AUTH -L ${url} -J -O
31
27 done
32 done
28
33
29 ## rhodecode control
34 ## rhodecode control
@@ -43,3 +48,4 b' fi'
43
48
44 mv -v "${INSTALLER}" $CACHE_DIR
49 mv -v "${INSTALLER}" $CACHE_DIR
45 mv -v *.bz2 $CACHE_DIR
50 mv -v *.bz2 $CACHE_DIR
51 ls -lh $CACHE_DIR No newline at end of file
@@ -2,12 +2,12 b' COMPOSE_PROJECT_NAME=rc_cluster'
2 TZ="UTC"
2 TZ="UTC"
3
3
4 # Version to deploy and run
4 # Version to deploy and run
5 RC_VERSION="4.24.1"
5 RC_VERSION="4.25.0"
6
6
7 # Database access credentials
7 # Database access credentials
8 POSTGRES_DB=rhodecode
8 DB_NAME=rhodecode
9 POSTGRES_USER=rhodecode
9 DB_USER=rhodecode
10 POSTGRES_PASSWORD=hUc1adS7oDd6Oj3in3
10 DB_PASSWORD=hUc1adS7oDd6Oj3in3
11
11
12 # base url for running app
12 # base url for running app
13 RHODECODE_BASE_URL=http://localhost:8888
13 RHODECODE_BASE_URL=http://localhost:8888
@@ -25,7 +25,38 b' Visit docker site and install docker (min version 20.10) and docker compose:'
25 - https://docs.docker.com/compose/install/
25 - https://docs.docker.com/compose/install/
26
26
27
27
28 # Installation steps
28 ## Data structure
29
30 There are 4 volumes defined:
31
32
33 - `/etc/rhodecode/conf`
34
35 Used for configuration files for rhodecode, vcsserver and supervisord, and some cache data
36
37 - `/var/opt/rhodecode_repo_store`
38
39 Used for main repository storage where repositories would be stored
40
41 - `/var/opt/rhodecode_data`
42
43 data dir for rhodecode cache/lock files, or user sessions (for file backend)
44
45 - `/var/log/rhodecode`
46
47 Used to store all logs from RhodeCode
48
49
50 ## Setup/Build options
51
52 There are 3 options to run the docker stack.
53
54 - [Standalone cluster build from installer](#standalone-cluster-build-from-installer)
55 - [Standalone cluster build from source](#like-this-one)
56 - [dev enviroment setup](#like-this-one)
57
58
59 # Standalone cluster build from installer
29
60
30 Follow these steps to build and run the RhodeCode Cluster via Docker-compose.
61 Follow these steps to build and run the RhodeCode Cluster via Docker-compose.
31 Get the repository:
62 Get the repository:
@@ -38,7 +69,9 b' First start by fetching required installer binaries. This is required to create '
38 simple build and full compose setup.
69 simple build and full compose setup.
39 Please check the `.env` file to adjust the version if needed.
70 Please check the `.env` file to adjust the version if needed.
40
71
41 `cd .boostrap/; ./download-artifacts.sh; cd ../`
72 ```shell
73 cd .bootstrap/; ./download-artifacts.sh; cd ../
74 ```
42
75
43 This will download required files and put them into the `.cache` directory.
76 This will download required files and put them into the `.cache` directory.
44 This directory should look similar to that after downloads have finish:
77 This directory should look similar to that after downloads have finish:
@@ -61,7 +94,6 b' This setup would use a provided license from a file'
61 please save the license data inside this file, so it will be applied at creation.
94 please save the license data inside this file, so it will be applied at creation.
62 This file can also be empty and license can be applied via a WEB interface.
95 This file can also be empty and license can be applied via a WEB interface.
63
96
64
65 ## Run Docker compose build:
97 ## Run Docker compose build:
66
98
67 To create a full stack we need to run the database container, so it's ready to
99 To create a full stack we need to run the database container, so it's ready to
@@ -73,19 +105,27 b' build the docker image.'
73 docker-compose up --detach database
105 docker-compose up --detach database
74 ```
106 ```
75
107
76 This will start our postgres database, and expose it to the network.
108 This will start our postgres database, and expose it to the network.
77 We can now run the full installation. Database needs to be running for the next build command.
109
110 2) We can now run the full installation. Database needs to be running for the next build command.
78
111
79 ```shell
112 ```shell
80 docker-compose build rhodecode
113 docker-compose build rhodecode
81 docker-compose build
114 docker-compose build
82 ```
115 ```
83
116
84 Once we build the rhodecode app, we can run the whole stack using `docker-compose up`
117 _Disk space problems?_
118
119 ```shell
120 docker system df
121 docker builder prune
122 ```
85
123
86 ```shell
124 3) Once we build the rhodecode app, we can run the whole stack using `docker-compose up`
87 docker-compose up
125
88 ```
126 ```shell
127 docker-compose up
128 ```
89
129
90 You can access Running RhodeCode under via Nginx under:
130 You can access Running RhodeCode under via Nginx under:
91 http://localhost:8888
131 http://localhost:8888
@@ -97,17 +137,6 b' In case for bigger setups docker-compose can scale more rhodecode/vcsserver work'
97 docker-compose up --scale vcsserver=3 rhodecode=3
137 docker-compose up --scale vcsserver=3 rhodecode=3
98 ```
138 ```
99
139
100 ## Data structure
101
102 There are 4 volumes defined:
103
104 - `/var/log/rhodecode` # all logs from RhodeCode are saved in this volume
105 - `/etc/rhodecode/conf` # storing configuration files for rhodecode, vcsserver and supervisord, and some cache data
106 - `/var/opt/rhodecode_repo_store` # main repository storage where repositories would be stored
107 - `/var/opt/rhodecode_data` # data dir for rhodecode cache/lock files, or user sessions (for file backend)
108
109
110
111
140
112 Upgrade:
141 Upgrade:
113
142
@@ -118,17 +147,22 b' Upgrade:'
118 - docker-compose stop
147 - docker-compose stop
119 - docker-compose up
148 - docker-compose up
120
149
150 # Standalone cluster build from source
121
151
152 There's an option to build the latest branches as a docker installation.
153 - Download the source:
122
154
155 ```shell
156 cd .boostrap/; ./download-source.sh; cd ../
157 ```
123
158
159 Build the source based image
124
160
161 ```shell
162 docker-compose -f docker-compose.yaml -f docker-compose-source.yaml build --no-cache --progress=plain rhodecode
163 ```
125
164
126
165 to create a source install override and build based on the downloaded sources.
127
128
129
130
131
132
166
133
167
134
168
@@ -26,11 +26,16 b' volumes:'
26 labels:
26 labels:
27 "keep": 1
27 "keep": 1
28
28
29 # volume for postgres db store
29 # volume for Postgres db store
30 pg_data:
30 pg_data:
31 labels:
31 labels:
32 "keep": 1
32 "keep": 1
33
33
34 # volume for MySQL db store
35 mysql_data:
36 labels:
37 "keep": 1
38
34 # volume for rhodecode elasticsearch
39 # volume for rhodecode elasticsearch
35 es_data:
40 es_data:
36 labels:
41 labels:
@@ -63,11 +68,10 b' services:'
63 build:
68 build:
64 context: .
69 context: .
65 dockerfile: service/rhodecode/rhodecode.dockerfile
70 dockerfile: service/rhodecode/rhodecode.dockerfile
66 #network: rhodecode_network
67 args:
71 args:
68 TZ: ${TZ}
72 TZ: ${TZ}
69 RHODECODE_VERSION: ${RC_VERSION:?specify-RC_VERSION-env-var}
73 RHODECODE_VERSION: ${RC_VERSION:?specify-RC_VERSION-env-var}
70 RHODECODE_DB: postgresql://rhodecode:${POSTGRES_PASSWORD:?must-specify-db-password}@database/${POSTGRES_DB:?must-specify-db-name}
74 RHODECODE_DB: postgresql://rhodecode:${DB_PASSWORD:?must-specify-db-password}@database/${DB_NAME:?must-specify-db-name}
71 RHODECODE_USER_NAME: ${RHODECODE_USER_NAME}
75 RHODECODE_USER_NAME: ${RHODECODE_USER_NAME}
72 RHODECODE_USER_PASS: ${RHODECODE_USER_PASS}
76 RHODECODE_USER_PASS: ${RHODECODE_USER_PASS}
73 RHODECODE_USER_EMAIL: ${RHODECODE_USER_EMAIL}
77 RHODECODE_USER_EMAIL: ${RHODECODE_USER_EMAIL}
@@ -83,6 +87,8 b' services:'
83
87
84 DB_UPGRADE: 1 # run the DB upgrade
88 DB_UPGRADE: 1 # run the DB upgrade
85 SETUP_APP: 1 # run the application default settings setup, can be turned off after initial run
89 SETUP_APP: 1 # run the application default settings setup, can be turned off after initial run
90 #FORCE_DB_INIT_FILE: 1 # force the database init, warning: destroys old DB
91 #FORCE_RC_SETUP_APP: 1 # force running setup scripts for configuration/license application
86 MAIN_INI_PATH: /etc/rhodecode/conf/compose/rhodecode.optimized.ini
92 MAIN_INI_PATH: /etc/rhodecode/conf/compose/rhodecode.optimized.ini
87
93
88 # SVN Specific
94 # SVN Specific
@@ -327,14 +333,13 b' services:'
327 redis:
333 redis:
328 networks:
334 networks:
329 - rhodecode_network
335 - rhodecode_network
330 image: rhodecode/redis:6.2.1
336 image: rhodecode/redis:6.2.4
331
337
332 build:
338 build:
333 context: .
339 context: .
334 dockerfile: service/redis/rhodecode_redis.dockerfile
340 dockerfile: service/redis/rhodecode_redis.dockerfile
335 network: rhodecode_network
336 args:
341 args:
337 REDIS_BUILD: 6.2.1
342 REDIS_BUILD: 6.2.4
338
343
339 restart: unless-stopped
344 restart: unless-stopped
340
345
@@ -343,23 +348,23 b' services:'
343
348
344 volumes:
349 volumes:
345 - logvolume:/var/log/rhodecode
350 - logvolume:/var/log/rhodecode
351 - datavolume:/var/opt/rhodecode_data
346
352
347 database:
353 database:
348 networks:
354 networks:
349 - rhodecode_network
355 - rhodecode_network
350 image: rhodecode/database:13.2
356 image: rhodecode/database:13.3
351
357
352 build:
358 build:
353 context: .
359 context: .
354 dockerfile: service/database/rhodecode_database.dockerfile
360 dockerfile: service/database/rhodecode_database.dockerfile
355 network: rhodecode_network
356 args:
361 args:
357 POSTGRES_BUILD: 13.2
362 POSTGRES_BUILD: 13.3
358
363
359 environment:
364 environment:
360 POSTGRES_DB: ${POSTGRES_DB:?must-specify-db-name}
365 POSTGRES_DB: ${DB_NAME:?must-specify-db-name}
361 POSTGRES_USER: ${POSTGRES_USER:?must-specify-db-user}
366 POSTGRES_USER: ${DB_USER:?must-specify-db-user}
362 POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?must-specify-db-password}
367 POSTGRES_PASSWORD: ${DB_PASSWORD:?must-specify-db-password}
363
368
364 restart: unless-stopped
369 restart: unless-stopped
365
370
@@ -371,17 +376,44 b' services:'
371 - pg_data:/var/lib/postgresql/data
376 - pg_data:/var/lib/postgresql/data
372 - logvolume:/var/log/rhodecode
377 - logvolume:/var/log/rhodecode
373
378
379 database-mysql:
380 networks:
381 - rhodecode_network
382
383 image: rhodecode/database_mysql:8.0.25
384
385 build:
386 context: .
387 dockerfile: service/database/rhodecode_database_mysql.dockerfile
388 args:
389 MYSQL_BUILD: 8.0.24
390
391 environment:
392 MYSQL_DATABASE: ${DB_NAME:?must-specify-db-name}
393 MYSQL_USER: ${DB_USER:?must-specify-db-user}
394 MYSQL_PASSWORD: ${DB_PASSWORD:?must-specify-db-password}
395 MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:?must-specify-db-password}
396
397 restart: unless-stopped
398
399 ports:
400 - "127.0.0.1::3306"
401
402 volumes:
403 # save the mysql_data volume
404 - mysql_data:/var/lib/mysql
405 - logvolume:/var/log/rhodecode
406
374 nginx:
407 nginx:
375 networks:
408 networks:
376 - rhodecode_network
409 - rhodecode_network
377 image: rhodecode/nginx:1.19.8
410 image: rhodecode/nginx:1.21.1
378
411
379 build:
412 build:
380 context: .
413 context: .
381 dockerfile: service/nginx/rhodecode_nginx.dockerfile
414 dockerfile: service/nginx/rhodecode_nginx.dockerfile
382 network: rhodecode_network
383 args:
415 args:
384 NGINX_BUILD: 1.19.8
416 NGINX_BUILD: 1.21.1
385
417
386 restart: unless-stopped
418 restart: unless-stopped
387
419
@@ -92,7 +92,11 b' esac'
92 if [[ $RC_APP_TYPE = "rhodecode_http" ]]; then
92 if [[ $RC_APP_TYPE = "rhodecode_http" ]]; then
93
93
94 DB_INIT_FILE=/var/opt/rhodecode_data/.dbinit_bootstrapped
94 DB_INIT_FILE=/var/opt/rhodecode_data/.dbinit_bootstrapped
95 # Avoid DB_INIT to run 2x
95 if [ "$FORCE_DB_INIT_FILE" = 1 ]; then
96 rm $DB_INIT_FILE
97 fi
98
99 # Avoid DB_INIT to run multiple times
96 if [[ ! -e $DB_INIT_FILE ]]; then
100 if [[ ! -e $DB_INIT_FILE ]]; then
97 echo "ENTRYPOINT: Starting $RC_APP_TYPE initial db bootstrap"
101 echo "ENTRYPOINT: Starting $RC_APP_TYPE initial db bootstrap"
98
102
@@ -103,9 +107,13 b' if [[ $RC_APP_TYPE = "rhodecode_http" ]]; then'
103
107
104 fi
108 fi
105
109
106 BOOTSTRAP_FILE=/var/opt/rhodecode_data/.setup_bootstrapped
110 RC_SETUP_FILE=/var/opt/rhodecode_data/.setup_bootstrapped
111 if [ "$FORCE_RC_SETUP_APP" = 1 ]; then
112 rm $RC_SETUP_FILE
113 fi
114
107 # Avoid destroying bootstrapping by simple start/stop
115 # Avoid destroying bootstrapping by simple start/stop
108 if [[ ! -e $BOOTSTRAP_FILE ]]; then
116 if [[ ! -e $RC_SETUP_FILE ]]; then
109 echo "ENTRYPOINT: Starting $RC_APP_TYPE initial bootstrap"
117 echo "ENTRYPOINT: Starting $RC_APP_TYPE initial bootstrap"
110
118
111 # copy over default configuration files
119 # copy over default configuration files
@@ -116,8 +124,8 b' if [[ $RC_APP_TYPE = "rhodecode_http" ]]; then'
116 rhodecode_setup
124 rhodecode_setup
117 fi
125 fi
118
126
119 gosu $RC_USER touch "$BOOTSTRAP_FILE"
127 gosu $RC_USER touch "$RC_SETUP_FILE"
120 echo "ENTRYPOINT: marked as setup-bootstrapped at $BOOTSTRAP_FILE"
128 echo "ENTRYPOINT: marked as setup-bootstrapped at $RC_SETUP_FILE"
121
129
122 fi
130 fi
123
131
@@ -339,7 +339,7 b' rdbcompression yes'
339 rdbchecksum yes
339 rdbchecksum yes
340
340
341 # The filename where to dump the DB
341 # The filename where to dump the DB
342 dbfilename dump.rdb
342 dbfilename redis_dump.rdb
343
343
344 # Remove RDB files used by replication in instances without persistence
344 # Remove RDB files used by replication in instances without persistence
345 # enabled. By default this option is disabled, however there are environments
345 # enabled. By default this option is disabled, however there are environments
@@ -362,7 +362,7 b' rdb-del-sync-files no'
362 # The Append Only File will also be created inside this directory.
362 # The Append Only File will also be created inside this directory.
363 #
363 #
364 # Note that you must specify a directory here, not a file name.
364 # Note that you must specify a directory here, not a file name.
365 dir ./
365 dir /var/opt/rhodecode_data/
366
366
367 ################################# REPLICATION #################################
367 ################################# REPLICATION #################################
368
368
@@ -1,3 +1,4 b''
1 # 20.10
1 FROM ubuntu:groovy
2 FROM ubuntu:groovy
2 MAINTAINER RhodeCode Inc. <support@rhodecode.com>
3 MAINTAINER RhodeCode Inc. <support@rhodecode.com>
3
4
@@ -5,7 +6,7 b' ARG TZ="UTC"'
5 ARG LOCALE_TYPE=en_US.UTF-8
6 ARG LOCALE_TYPE=en_US.UTF-8
6 ARG RHODECODE_TYPE=Enterprise
7 ARG RHODECODE_TYPE=Enterprise
7 # binary-install
8 # binary-install
8 ARG RHODECODE_VERSION=4.24.1
9 ARG RHODECODE_VERSION=4.25.0
9
10
10 ARG RHODECODE_DB=sqlite
11 ARG RHODECODE_DB=sqlite
11 ARG RHODECODE_USER_NAME=admin
12 ARG RHODECODE_USER_NAME=admin
@@ -60,6 +61,7 b' ENV \\'
60 ENV SVN_LOCALE_DEPS apache2 apache2-utils libapache2-mod-svn
61 ENV SVN_LOCALE_DEPS apache2 apache2-utils libapache2-mod-svn
61 ENV SSH_LOCALE_DEPS openssh-server
62 ENV SSH_LOCALE_DEPS openssh-server
62 ENV PYTHON_DEPS python2
63 ENV PYTHON_DEPS python2
64 ENV EXTRA_DEPS ""
63
65
64 RUN \
66 RUN \
65 echo "** install base packages **" && \
67 echo "** install base packages **" && \
@@ -83,6 +85,7 b' set -eux; \\'
83 $PYTHON_DEPS \
85 $PYTHON_DEPS \
84 $SSH_LOCALE_DEPS \
86 $SSH_LOCALE_DEPS \
85 $SVN_LOCALE_DEPS \
87 $SVN_LOCALE_DEPS \
88 $EXTRA_DEPS \
86 ; \
89 ; \
87 rm -rf /var/lib/apt/lists/*;
90 rm -rf /var/lib/apt/lists/*;
88
91
@@ -168,6 +171,7 b' echo "**** Apache config ****" && \\'
168
171
169
172
170 # Copy artifacts
173 # Copy artifacts
174
171 COPY --chown=$RC_USER:$RC_USER .cache/* /home/$RC_USER/.rccontrol/cache/
175 COPY --chown=$RC_USER:$RC_USER .cache/* /home/$RC_USER/.rccontrol/cache/
172 COPY --chown=$RC_USER:$RC_USER config/compose/rhodecode_enterprise.license /home/$RC_USER/.rccontrol/bootstrap/
176 COPY --chown=$RC_USER:$RC_USER config/compose/rhodecode_enterprise.license /home/$RC_USER/.rccontrol/bootstrap/
173 COPY --chown=$RC_USER:$RC_USER service/rhodecode/bootstrap/* /home/$RC_USER/.rccontrol/bootstrap/
177 COPY --chown=$RC_USER:$RC_USER service/rhodecode/bootstrap/* /home/$RC_USER/.rccontrol/bootstrap/
General Comments 0
You need to be logged in to leave comments. Login now