Show More
@@ -52,14 +52,14 b' server {' | |||||
52 | gzip_disable "msie6"; |
|
52 | gzip_disable "msie6"; | |
53 | expires 60d; |
|
53 | expires 60d; | |
54 |
|
54 | |||
55 |
alias /var/opt/rhodecode_ |
|
55 | alias /var/opt/rhodecode_static_data; | |
56 | } |
|
56 | } | |
57 |
|
57 | |||
58 | ## Custom 502 error page. |
|
58 | ## Custom 502 error page. | |
59 | ## Will be displayed while RhodeCode server is turned off |
|
59 | ## Will be displayed while RhodeCode server is turned off | |
60 | error_page 502 /502.html; |
|
60 | error_page 502 /502.html; | |
61 | location = /502.html { |
|
61 | location = /502.html { | |
62 |
root /var/opt/rhodecode_ |
|
62 | root /var/opt/rhodecode_static_data; | |
63 | internal; |
|
63 | internal; | |
64 | } |
|
64 | } | |
65 |
|
65 |
@@ -100,11 +100,15 b' services:' | |||||
100 | # - "127.0.0.1::10020" |
|
100 | # - "127.0.0.1::10020" | |
101 | extends: |
|
101 | extends: | |
102 | service: rhodecode_base |
|
102 | service: rhodecode_base | |
|
103 | ||||
103 | deploy: |
|
104 | deploy: | |
104 | # override this in .custom/docker-compose-apps.override.yaml to scale up |
|
105 | # override this in .custom/docker-compose-apps.override.yaml to scale up | |
105 | # replicas of rhodecode and vcsserver should be equal in most cases |
|
106 | # replicas of rhodecode and vcsserver should be equal in most cases | |
106 | replicas: 1 |
|
107 | replicas: 1 | |
107 |
|
108 | |||
|
109 | volumes: | |||
|
110 | - ./.custom/static_files:/var/opt/rhodecode_static_data | |||
|
111 | ||||
108 | labels: |
|
112 | labels: | |
109 | - "autoheal=true" |
|
113 | - "autoheal=true" | |
110 | - "traefik.enable=true" |
|
114 | - "traefik.enable=true" |
@@ -30,7 +30,6 b' volumes:' | |||||
30 | labels: |
|
30 | labels: | |
31 | "keep": 1 |
|
31 | "keep": 1 | |
32 |
|
32 | |||
33 |
|
||||
34 | services: |
|
33 | services: | |
35 |
|
34 | |||
36 | channelstream: |
|
35 | channelstream: | |
@@ -73,7 +72,7 b' services:' | |||||
73 | profiles: |
|
72 | profiles: | |
74 | ["channelstream"] |
|
73 | ["channelstream"] | |
75 |
|
74 | |||
76 | nginx: |
|
75 | nginx-statics: | |
77 | # used to serve static files |
|
76 | # used to serve static files | |
78 | networks: |
|
77 | networks: | |
79 | - rhodecode_network |
|
78 | - rhodecode_network | |
@@ -100,6 +99,7 b' services:' | |||||
100 | - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro |
|
99 | - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro | |
101 | - ./config/nginx/http.conf:/etc/nginx/http.conf:ro |
|
100 | - ./config/nginx/http.conf:/etc/nginx/http.conf:ro | |
102 | - ./config/nginx/proxy.conf:/etc/nginx/proxy.conf:ro |
|
101 | - ./config/nginx/proxy.conf:/etc/nginx/proxy.conf:ro | |
|
102 | - ./.custom/static_files:/var/opt/rhodecode_static_data | |||
103 | - rc_datavolume:/var/opt/rhodecode_data |
|
103 | - rc_datavolume:/var/opt/rhodecode_data | |
104 |
|
104 | |||
105 | logging: |
|
105 | logging: |
@@ -16,6 +16,12 b' function config_copy() {' | |||||
16 |
|
16 | |||
17 | } |
|
17 | } | |
18 |
|
18 | |||
|
19 | function expose_statics() { | |||
|
20 | echo "exposing static files..." | |||
|
21 | cp -Rf /var/opt/rhodecode_static/static /var/opt/rhodecode_static_data | |||
|
22 | } | |||
|
23 | ||||
|
24 | ||||
19 | function db_upgrade() { |
|
25 | function db_upgrade() { | |
20 | echo 'ENTRYPOINT: Upgrading database.' |
|
26 | echo 'ENTRYPOINT: Upgrading database.' | |
21 | /usr/local/bin/rhodecode_bin/bin/rc-upgrade-db $MAIN_INI_PATH --force-yes |
|
27 | /usr/local/bin/rhodecode_bin/bin/rc-upgrade-db $MAIN_INI_PATH --force-yes | |
@@ -140,6 +146,10 b' if [[ $RC_APP_TYPE = "rhodecode_http" ]]; then' | |||||
140 | # copy over default configuration files |
|
146 | # copy over default configuration files | |
141 | config_copy |
|
147 | config_copy | |
142 |
|
148 | |||
|
149 | # expose our static files on deploy, assuming they are in | |||
|
150 | # /var/opt/rhodecode_static/static of rhodecode image container | |||
|
151 | expose_statics | |||
|
152 | ||||
143 | DB_INIT_FILE=/var/opt/rhodecode_data/.dbinit_bootstrapped |
|
153 | DB_INIT_FILE=/var/opt/rhodecode_data/.dbinit_bootstrapped | |
144 | if [ "$FORCE_DB_INIT_FILE" = 1 ]; then |
|
154 | if [ "$FORCE_DB_INIT_FILE" = 1 ]; then | |
145 | rm $DB_INIT_FILE |
|
155 | rm $DB_INIT_FILE |
General Comments 0
You need to be logged in to leave comments.
Login now