Skip to content

Commit

Permalink
Make sure to generate resolvers.conf.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesage committed Apr 18, 2019
1 parent 39a23b6 commit 7a90e76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ RUN \
mv /etc/nginx/conf.d/include/ip_ranges.conf /defaults/ && \
ln -sf /config/nginx/ip_ranges.conf /etc/nginx/conf.d/include/ip_ranges.conf && \

# Make sure the config file for resovers is stored in persistent volume.
rm /etc/nginx/conf.d/include/resolvers.conf && \
ln -sf /config/nginx/resolvers.conf /etc/nginx/conf.d/include/resolvers.conf && \

# Make sure nginx cache is stored on the persistent volume.
ln -s /config/nginx/cache /var/lib/nginx/cache && \

Expand Down
3 changes: 3 additions & 0 deletions rootfs/etc/cont-init.d/nginx-proxy-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ then
> /dev/null 2>&1
fi

# Generate the resolvers configuration file.
echo resolver $(awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf) ";" > /config/nginx/resolvers.conf

# Take ownership of the config directory content.
find /config -mindepth 1 -exec chown $USER_ID:$GROUP_ID {} \;

Expand Down

0 comments on commit 7a90e76

Please sign in to comment.