Skip to content

Commit

Permalink
Backout logging changes (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
neomantra committed Oct 3, 2019
1 parent d7550f9 commit 43629b3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Changelog

* Upgrade built-from-upstream packages (`stretch`, `centos`, `windows`) to 1.15.8.2
* Upgrade LuaRocks to 3.2.1 (#122)
* Move default writable paths to dedicated directories `/var/log/openresty` and `/var/run/openresty` (#119)
* Move default writable temp paths to dedicated directories `/var/run/openresty` (#119)

## 1.15.8.2-1 (untagged in git)

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ docker run [options] openresty/openresty:stretch-fat

*[options]* would be things like -p to map ports, -v to map volumes, and -d to daemonize.

`docker-openresty` symlinks `/var/log/openresty/access.log` and `error.log` to `/dev/stdout` and `/dev/stderr` respectively, so that Docker lteogging works correctly. If you change the log paths in your `ngin
x.conf`, you should symlink those paths as well. This is not possible with the `windows` image.
`docker-openresty` symlinks `/usr/local/openresty/nginx/logs/access.log` and `error.log` to `/dev/stdout` and `/dev/stderr` respectively, so that Docker logging works correctly. If you change the log paths in your `nginx.conf`, you should symlink those paths as well. This is not possible with the `windows` image.

Temporary directories such as `client_body_temp_path` are stored in `/var/run/openresty/`. You may consider mounting that volume, rather than writing to a container-local directory.

Expand Down
4 changes: 2 additions & 2 deletions bionic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& if [ -n "${RESTY_ADD_PACKAGE_BUILDDEPS}" ]; then DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge ${RESTY_ADD_PACKAGE_BUILDDEPS} ; fi \
&& DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \
&& ln -sf /dev/stdout /var/log/openresty/access.log \
&& ln -sf /dev/stderr /var/log/openresty/error.log
&& ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \
&& ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log

# Add additional binaries into PATH for convenience
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
Expand Down
4 changes: 2 additions & 2 deletions centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ RUN yum-config-manager --add-repo https://openresty.org/package/${RESTY_IMAGE_BA
&& rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& yum remove -y make \
&& yum clean all \
&& ln -sf /dev/stdout /var/log/openresty/access.log \
&& ln -sf /dev/stderr /var/log/openresty/error.log
&& ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \
&& ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log

# Unused, present for parity with other Dockerfiles
# This makes some tooling/testing easier, as specifying a build-arg
Expand Down
5 changes: 2 additions & 3 deletions stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \
&& DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& ln -sf /dev/stdout /var/log/openresty/access.log \
&& ln -sf /dev/stderr /var/log/openresty/error.log

&& ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \
&& ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log

# Add additional binaries into PATH for convenience
ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin"
Expand Down
4 changes: 2 additions & 2 deletions xenial/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& if [ -n "${RESTY_ADD_PACKAGE_BUILDDEPS}" ]; then DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge ${RESTY_ADD_PACKAGE_BUILDDEPS} ; fi \
&& DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \
&& ln -sf /dev/stdout /var/log/openresty/access.log \
&& ln -sf /dev/stderr /var/log/openresty/error.log
&& ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log \
&& ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log

# Add additional binaries into PATH for convenience
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
Expand Down

0 comments on commit 43629b3

Please sign in to comment.