##// END OF EJS Templates
core: various changes
super-admin -
Show More
@@ -0,0 +1,46 b''
1 # Quick list of action to migrate old pre 4.28.0 installer based releases to docker stack
2
3 ### 1. Decide on components use
4
5 By default RhodeCode stack uses Redis and Postgres.
6 We recommend using those in Docker as things like
7 backup/restore are much easier, and possible to run by our installer
8
9 If you plan to use your own redis or DB, uncomment/disable those services in file:
10 `docker-compose-services.override.yaml`
11
12 Select your DB type by commenting postgres or mysql db in docker-compose-services.override.yaml
13 For Sqlite, comment out both DB types
14
15 ### 2. launch stack based on get started
16
17 Run a quick start guide based on ./rccontrol get-started
18
19 ### 3. make a db dump
20 If docker-based DB is selected
21 Create a database backup from your db type
22 If you plan to use you old running DB, this step can be ommited
23
24 ### 4. restore db
25 If docker-based DB is selected
26 Restore the database into docker container running DB
27
28 ### mv repositories data to .custom/storage
29
30 ### mv gists data to .custom/storage
31
32 ### mv artifacts data to .custom/storage
33
34 ### mv tarball cache data to .custom/storage
35
36 ### ./rccontrol cli storage
37
38 ### move repos to /vol/repovolume
39
40 ### move artifacts data to /vol/datavolume
41
42 ### move tarballcache data to /vol/datavolume
43
44 ### cp rhodecode.ini to config/_shared/rhodecode.ini
45
46 ### cp vcsserver.ini to config/_shared/vcsserver.ini No newline at end of file
@@ -0,0 +1,5 b''
1 #!/usr/bin/env bash
2
3 cd scripts/rccontrol/
4 #alias bashly='docker run --rm -it --user $(id -u):$(id -g) --volume "$PWD:/app" dannyben/bashly:edge'
5 docker run --rm -it --user $(id -u):$(id -g) --volume "$PWD:/app" dannyben/bashly:edge generate --watch
@@ -1,5 +1,6 b''
1 defaults:
1 defaults:
2 # metrics expiration
2 # metrics expiration
3 # 2 days
3 ttl: 48h
4 ttl: 48h
4
5
5 mappings:
6 mappings:
@@ -3,6 +3,7 b' set -Eeo pipefail'
3
3
4 function config_copy() {
4 function config_copy() {
5 # copy over the configs if they don't exist
5 # copy over the configs if they don't exist
6 echo "checking if config files needs bootstrapping"
6 for f in /etc/rhodecode/conf_build/*; do
7 for f in /etc/rhodecode/conf_build/*; do
7 fname=${f##*/}
8 fname=${f##*/}
8 if [ ! -f "/etc/rhodecode/conf/$fname" ]; then
9 if [ ! -f "/etc/rhodecode/conf/$fname" ]; then
@@ -89,8 +90,16 b' case "$1" in'
89 supervisord | pserve | gunicorn ) isLikelyWeb=1 ;;
90 supervisord | pserve | gunicorn ) isLikelyWeb=1 ;;
90 esac
91 esac
91
92
93 if [[ $RC_APP_TYPE = "rhodecode_vcsserver" ]]; then
94 # copy over default configuration files
95 config_copy
96 fi
97
92 if [[ $RC_APP_TYPE = "rhodecode_http" ]]; then
98 if [[ $RC_APP_TYPE = "rhodecode_http" ]]; then
93
99
100 # copy over default configuration files
101 config_copy
102
94 DB_INIT_FILE=/var/opt/rhodecode_data/.dbinit_bootstrapped
103 DB_INIT_FILE=/var/opt/rhodecode_data/.dbinit_bootstrapped
95 if [ "$FORCE_DB_INIT_FILE" = 1 ]; then
104 if [ "$FORCE_DB_INIT_FILE" = 1 ]; then
96 rm $DB_INIT_FILE
105 rm $DB_INIT_FILE
@@ -116,9 +125,6 b' if [[ $RC_APP_TYPE = "rhodecode_http" ]]; then'
116 if [[ ! -e $RC_SETUP_FILE ]]; then
125 if [[ ! -e $RC_SETUP_FILE ]]; then
117 echo "ENTRYPOINT: Starting $RC_APP_TYPE initial bootstrap"
126 echo "ENTRYPOINT: Starting $RC_APP_TYPE initial bootstrap"
118
127
119 # copy over default configuration files
120 config_copy
121
122 # setup application with specific options
128 # setup application with specific options
123 if [ "$SETUP_APP" = 1 ]; then
129 if [ "$SETUP_APP" = 1 ]; then
124 rhodecode_setup
130 rhodecode_setup
@@ -30,7 +30,7 b' case ${1:-} in'
30 exit
30 exit
31 ;;
31 ;;
32 dev-env )
32 dev-env )
33 eval "./rccontrol stack metrics up --detach statsd-exporter && ./rccontrol stack services up --detach && ./rccontrol stack rhodecode up --detach celery celery-beat && ./rccontrol status -s"
33 eval "./rccontrol stack metrics up --detach statsd-exporter && ./rccontrol stack services up --detach && ./rccontrol stack rhodecode up --detach celery celery-beat && ./rccontrol status"
34 exit
34 exit
35 ;;
35 ;;
36 prune )
36 prune )
General Comments 0
You need to be logged in to leave comments. Login now