Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8c7f2fb

Browse files
committed
Fix: misnamed environment variable and improve the enable-ssl command in Makefile
1 parent9c0bf82 commit8c7f2fb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎Makefile‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ gen-certs:
218218
-e STATE=${NGINX_SSL_STATE}\
219219
-e LOCALITY=${NGINX_SSL_LOCALITY}\
220220
-e ORGANIZATION=${NGINX_SSL_ORGANIZATION}\
221-
-e ORGANIZATIONAL_UNIT=${SSL_UNIT}\
221+
-e ORGANIZATIONAL_UNIT=${NGINX_SSL_UNIT}\
222222
-e EMAIL=${NGINX_SSL_EMAIL}\
223223
-e CERT_EXPIRY=${NGINX_SSL_DAYS}\
224224
-e KEY_SIZE=${NGINX_SSL_KEY_SIZE}\
@@ -228,9 +228,10 @@ gen-certs:
228228

229229
enable-ssl:
230230
@echo"${BLUE}Enabling SSL in Nginx configuration...${NC}"
231-
@sed -i's/# server {/server {/' etc/nginx/default.conf
232-
@sed -i's/# \(.*ssl.*\)/\1/' etc/nginx/default.conf
233-
@sed -i's/# \(.*443.*\)/\1/' etc/nginx/default.conf
231+
@docker run --rm\
232+
-v$(PWD)/etc/nginx:/etc/nginx\
233+
alpine:latest\
234+
sh -c'apk add --no-cache sed && sed -i "/^# server {/,/^# }/ s/^# //" /etc/nginx/default.template.conf && sed -i "/^#[[:space:]]*$$/s/^#//" /etc/nginx/default.template.conf'
234235
@$(MAKE) restart
235236
@echo"${GREEN}SSL has been enabled. Access your site at https://${NGINX_HOST}:3000${NC}"
236237

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp