Skip to content

Commit 7d5c47f

Browse files
fix : remove USE_MY_OWN_NGINX_ORIGIN
1 parent 58bc9a5 commit 7d5c47f

11 files changed

+23
-70
lines changed

.env.example

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,4 @@ NGINX_LOGROTATE_FILE_SIZE=1M
8585

8686
SHARED_VOLUME_GROUP_ID=1351
8787
SHARED_VOLUME_GROUP_NAME=shared-volume-group
88-
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=
89-
90-
USE_MY_OWN_NGINX_ORIGIN=false
88+
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=

.env.example.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,4 @@
7777

7878
SHARED_VOLUME_GROUP_ID=1351
7979
SHARED_VOLUME_GROUP_NAME=shared-volume-group
80-
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=
81-
82-
USE_MY_OWN_NGINX_ORIGIN=false
80+
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=

.env.example.java.commercial.ssl.sample

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,4 @@ NGINX_LOGROTATE_FILE_SIZE=1M
7979

8080
SHARED_VOLUME_GROUP_ID=1351
8181
SHARED_VOLUME_GROUP_NAME=shared-volume-group
82-
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=
83-
84-
USE_MY_OWN_NGINX_ORIGIN=false
82+
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=

.env.example.node

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,4 @@ NGINX_LOGROTATE_FILE_SIZE=1M
7272

7373
SHARED_VOLUME_GROUP_ID=1351
7474
SHARED_VOLUME_GROUP_NAME=shared-volume-group
75-
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=
76-
77-
USE_MY_OWN_NGINX_ORIGIN=false
75+
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=

.env.example.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,4 @@
7979

8080
SHARED_VOLUME_GROUP_ID=1351
8181
SHARED_VOLUME_GROUP_NAME=laravel-shared-volume-group
82-
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=1000
83-
84-
USE_MY_OWN_NGINX_ORIGIN=false
82+
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=1000

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050

5151
/.docker/nginx/origin/nginx.conf.main.origin.customized
5252

53-
/.docker/nginx/origin/conf.d/http/additionals/nginx.conf.origin.customized
54-
/.docker/nginx/origin/conf.d/http/app/nginx.conf.origin.customized
53+
/.docker/nginx/origin/conf.d/http/additionals/nginx.conf.prepared.origin.customized
54+
/.docker/nginx/origin/conf.d/http/app/nginx.conf.prepared.origin.customized
5555

56-
/.docker/nginx/origin/conf.d/https/additionals/nginx.conf.origin.customized
57-
/.docker/nginx/origin/conf.d/https/app/nginx.conf.origin.customized
56+
/.docker/nginx/origin/conf.d/https/additionals/nginx.conf.prepared.origin.customized
57+
/.docker/nginx/origin/conf.d/https/app/nginx.conf.prepared.origin.customized
5858

README.md

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
- [APP_URL](#app_url)
2626
- [Important ENVs That Require Restarting NGINX](#important-envs-that-require-restarting-nginx)
2727
- [Upgrade](#upgrade)
28-
- [Fully Customizing NGINX Configuration](#fully-customizing-nginx-configuration)
2928
- [NGINX Prepared Function](#nginx-prepared-function)
3029
- [Terms](#terms)
3130
- [Log Levels](#log-levels)
@@ -324,7 +323,6 @@ NGINX_LOGROTATE_FILE_SIZE
324323
SHARED_VOLUME_GROUP_ID # The application to the host does NOT depend on NGINX_RESTART=true. It is always applied.
325324
SHARED_VOLUME_GROUP_NAME # The application to the host does NOT depend on NGINX_RESTART=true. It is always applied.
326325
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID # The application to the host does NOT depend on NGINX_RESTART=true. It is always applied.
327-
USE_MY_OWN_NGINX_ORIGIN
328326
```
329327

330328
### Upgrade
@@ -338,35 +336,6 @@ sudo bash run.sh
338336
```
339337
- However, as you are aware, ```NGINX_RESTART=true``` causes a short downtime. **Make sure ```NGINX_RESTART=false``` at all times**.
340338

341-
### Fully Customizing NGINX Configuration
342-
343-
![img.png](/documents/images/img3.png)
344-
345-
- The ``origin`` folder is where you can modify original Nginx conf files.
346-
- Create the five yellow-highlighted files ending with 'conf.d.origin.customized' by copying the originals ending with 'conf.d.origin.'
347-
- You don't have to create all five files; just create the ones you need.
348-
- In the .env file, set this to 'true'
349-
```shell
350-
USE_MY_OWN_NGINX_ORIGIN=true
351-
# See '[IMPORTANT] ENVs that require 'NGINX_RESTART=true' above.
352-
NGINX_RESTART=true
353-
```
354-
- For reference, the files you just created are ignored by git, so there won't be any issues when you run the following:
355-
```shell
356-
# Check if the source codes of Runner is manipulated.
357-
bash check-source-integrity.sh
358-
```
359-
- Then, run ``(sudo) bash run.sh``. **Starting from v5.0.0**, if NGINX_RESTART is set to 'true', the Runner will test your configuration using ``nginx -t`` in a temporary container before recreating the NGINX container. If the test fails, the process stops, preventing any side effects on your currently running app.
360-
- Don't touch any file in ``.docker/nginx/template``. They are just ones in ready to be injected into the NGINX Image in Dockerfile.
361-
- Process of NGINX Configuration
362-
- ``Origin`` -(processed with the .env)-> ``Template`` -(docker build)-> ``Docker Image`` -(running entrypoint.sh)-> ``Docker Container``
363-
- NGINX Logrotate
364-
- ``.docker/nginx/origin/logroate/nginx``
365-
- ENV Spel
366-
- A syntax that brings values from the .env file throughout the ecosystem.
367-
- ``!#{ value here }``
368-
![img4.png](/documents/images/img4.png)
369-
370339
### Terms
371340
For all echo messages or properties .env, the following terms indicate...
372341
- BUILD (=LOAD IMAGE) : ```docker build```
@@ -545,4 +514,16 @@ git status # If any changes are detected, the source code may be corrupted, or j
545514
docker swarm init
546515
sudo bash run.sh
547516
```
517+
518+
### ETC
519+
- Process of NGINX Configuration
520+
- ``Origin`` -(processed with the .env)-> ``Template`` -(docker build)-> ``Docker Image`` -(running entrypoint.sh)-> ``Docker Container``
521+
- NGINX Logrotate
522+
- ``.docker/nginx/origin/logroate/nginx``
523+
- ENV Spel
524+
- A syntax that brings values from the .env file throughout the ecosystem.
525+
- ``!#{ value here }``
526+
![img4.png](/documents/images/img4.png)
527+
528+
548529
---

documents/Deploy-React-Project-with-DBGR.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@
123123
SHARED_VOLUME_GROUP_ID=1559
124124
SHARED_VOLUME_GROUP_NAME=mba-shared-volume-group
125125
UIDS_BELONGING_TO_SHARED_VOLUME_GROUP_ID=1000,1001
126-
127-
USE_MY_OWN_NGINX_ORIGIN=false
126+
128127
```
129128
### Locate your commercial SSLs in the folder ``docker-blue-green-runner/.docker/ssl``. See the comments in the ``.env`` above.
130129
- For me, I have used GoDaddy, https://dearsikandarkhan.medium.com/ssl-godaddy-csr-create-on-mac-osx-4401c47fd94c .

documents/images/img3.png

205 Bytes
Loading

use-common.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ cache_non_dependent_global_vars() {
266266
if [[ $(validate_number "$nginx_logrotate_file_number") == "false" ]]; then
267267
echo "[WARNING] NGINX_LOGROTATE_FILE_NUMBER in .env has an incorrect format. (value: $nginx_logrotate_file_number, correct examples: 5,10,101..., etc. Expected behavior: Logrotate won't work). However, this is NOT a serious issue. We will continue the process."
268268
fi
269-
use_my_own_nginx_origin=$(get_value_from_env "USE_MY_OWN_NGINX_ORIGIN")
270269

271270
}
272271

use-nginx.sh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,6 @@ apply_docker_compose_volumes_onto_app_nginx_yaml(){
6262

6363
}
6464

65-
set_origin_file() {
66-
local customized_file=$1
67-
local default_file=$2
68-
69-
if [[ ${use_my_own_nginx_origin} = 'true' ]]; then
70-
if [[ -f $customized_file ]]; then
71-
echo $customized_file
72-
else
73-
echo $default_file
74-
fi
75-
else
76-
echo $default_file
77-
fi
78-
}
79-
8065

8166
save_nginx_prepared_template_from_origin(){
8267

@@ -177,8 +162,7 @@ save_nginx_main_template_from_origin(){
177162

178163
echo "[NOTICE] NGINX Main template (.docker/nginx/template/nginx.conf.main) is now being created."
179164

180-
local main_origin_file=$(set_origin_file ".docker/nginx/origin/nginx.conf.main.origin.customized" \
181-
".docker/nginx/origin/nginx.conf.main.origin")
165+
local main_origin_file=".docker/nginx/origin/nginx.conf.main.origin"
182166

183167
echo "[DEBUG] ${main_origin_file} will be processed into Template (.docker/nginx/template/nginx.conf.main)"
184168

0 commit comments

Comments
 (0)