File tree Expand file tree Collapse file tree 5 files changed +22
-14
lines changed
Expand file tree Collapse file tree 5 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,15 @@ Coming Soon...
2525
2626## Options
2727
28- | Variable | Default | Description  ; of  ; Environment  ; Variable |
29- | :---------- | :------------: | :------------------------------------------------- |
30- | STATIC | /static | Nginx root directory |
31- | SUID | 1000 | Directory group/user ID |
32- | GZIP_TYPES | ` * ` | Nginx gzip_types, set ` off ` to disable |
33- | GZIP_LENGTH | ` 1000 ` | Minimum content size to compress |
34- | BASIC_AUTH | - | Basic auth file contents |
35- | BASIC_REALM | ` Unauthorized ` | Minimum content size to compress |
28+ | Variable | Default | Description  ; of  ; Environment  ; Variable |
29+ | :---------- | :--------------------: | :------------------------------------------------- |
30+ | STATIC | /static | Nginx root directory |
31+ | SUID | 1000 | Directory group/user ID |
32+ | NGINX_INDEX | ` index.html index.htm ` | Nginx directory index files |
33+ | GZIP_TYPES | ` * ` | Nginx gzip_types, set ` off ` to disable |
34+ | GZIP_LENGTH | ` 1000 ` | Minimum content size to compress |
35+ | BASIC_AUTH | - | Basic auth file contents |
36+ | BASIC_REALM | ` Unauthorized ` | Minimum content size to compress |
3637
3738See the [ src/10-setup.sh] ( src/10-setup.sh ) file for more details.
3839
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ services:
3636 # memory: 64M
3737 # volumes:
3838 # - static:/home/${USER_NAME:-foo}/static
39- # - config:/etc/ssh/
39+ # - config:/etc/ssh
4040 # ports:
4141 # - "${SSH_PORT:-2222}:22"
4242
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ services:
3131 memory : 64M
3232 volumes :
3333 - static:/home/${USER_NAME:-foo}/static
34- - config:/etc/ssh/
34+ - config:/etc/ssh
3535 ports :
3636 - " ${SSH_PORT:-2222}:22"
3737
Original file line number Diff line number Diff line change 44
55echo " Running: ${0} "
66
7- echo " STATIC: ${STATIC:-/ static} "
7+ _NGINX_INDEX=" index.html index.htm"
8+ _STATIC=" /static"
9+
10+ echo " STATIC: ${STATIC:- $_STATIC } "
811echo " SUID: ${SUID:- 1000} "
12+ echo " NGINX_INDEX: ${NGINX_INDEX:= $_NGINX_INDEX } "
13+
14+ sed " s/NGINX_INDEX/${NGINX_INDEX:= $_NGINX_INDEX } /g" \
15+ -i /etc/nginx/nginx.conf
916
1017: " ${GZIP_TYPES:=* } "
1118echo " GZIP_TYPES: ${GZIP_TYPES} "
@@ -27,8 +34,8 @@ auth_basic_user_file /etc/nginx/auth.users;
2734EOF
2835fi
2936
30- echo " + chown -R ${SUID:- 1000} :${SUID:- 1000} ${STATIC:-/ static } "
31- chown -R " ${SUID:- 1000} :${SUID:- 1000} " " ${STATIC:-/ static } "
37+ echo " + chown -R ${SUID:- 1000} :${SUID:- 1000} ${STATIC:- $_STATIC } "
38+ chown -R " ${SUID:- 1000} :${SUID:- 1000} " " ${STATIC:- $_STATIC } "
3239
3340echo " ${0} - Done"
3441
Original file line number Diff line number Diff line change 2424
2525 location / {
2626 root /static;
27- index index .html index .htm index ;
27+ index NGINX_INDEX ;
2828 autoindex on;
2929 include /etc/nginx/conf.d/location .*;
3030 }
You can’t perform that action at this time.
0 commit comments