File tree 3 files changed +10
-4
lines changed
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
FROM openresty/openresty:alpine-fat
2
2
3
3
# allowed domains should be lua match pattern
4
- ENV DIFFIE_HELLMAN='' ALLOWED_DOMAINS='.*' AUTO_SSL_VERSION='0.13.1' FORCE_HTTPS='true' SITES='' LETSENCRYPT_URL='https://acme-v02.api.letsencrypt.org/directory'
4
+ ENV DIFFIE_HELLMAN='' \
5
+ ALLOWED_DOMAINS='.*' \
6
+ AUTO_SSL_VERSION='0.13.1' \
7
+ FORCE_HTTPS='true' \
8
+ SITES='' \
9
+ LETSENCRYPT_URL='https://acme-v02.api.letsencrypt.org/directory' \
10
+ RESOLVER_ADDRESS='8.8.8.8'
5
11
6
12
# Here we install open resty and generate dhparam.pem file.
7
13
# You can specify DIFFIE_HELLMAN=true to force regeneration of that file on first run
Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ if [ "$FORCE_HTTPS" == "true" ]; then
58
58
fi
59
59
60
60
61
- # let's substitute $ALLOWED_DOMAINS and $LETSENCRYPT_URL into OpenResty configuration
62
- envsubst ' $ALLOWED_DOMAINS,$LETSENCRYPT_URL' \
61
+ # let's substitute $ALLOWED_DOMAINS, $LETSENCRYPT_URL and $RESOLVER_ADDRESS into OpenResty configuration
62
+ envsubst ' $ALLOWED_DOMAINS,$LETSENCRYPT_URL,$RESOLVER_ADDRESS ' \
63
63
< ${RESTY_CONF_DIR} /resty-http.conf \
64
64
> ${RESTY_CONF_DIR} /resty-http.conf.copy \
65
65
&& mv ${RESTY_CONF_DIR} /resty-http.conf.copy ${RESTY_CONF_DIR} /resty-http.conf
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ lua_shared_dict auto_ssl_settings 64k;
14
14
# default DNS servers, which can be found in /etc/resolv.conf. If your network
15
15
# is not IPv6 compatible, you may wish to disable IPv6 results by using the
16
16
# "ipv6=off" flag (like "resolver 8.8.8.8 ipv6=off").
17
- resolver 8.8.8.8 ;
17
+ resolver $RESOLVER_ADDRESS ;
18
18
19
19
# Initial setup tasks.
20
20
init_by_lua_block {
You can’t perform that action at this time.
0 commit comments