├── VERSION ├── .gitignore ├── docker-compose.example.yaml ├── .github └── workflows │ ├── tag.yml │ └── build.yml ├── rootfs ├── etc │ └── cont-init.d │ │ └── tmm.sh └── startapp.sh ├── Dockerfile └── README.md /VERSION: -------------------------------------------------------------------------------- 1 | v5.0 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /media 2 | /config 3 | -------------------------------------------------------------------------------- /docker-compose.example.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | tinymediamanager_service: 5 | image: dzhuang/tinymediamanager:latest-v5 6 | container_name: tinymediamanager-v5 7 | ports: 8 | - 5800:5800 9 | - 5900:5900 10 | volumes: 11 | - ./config:/config 12 | - ./media:/media 13 | - ./share:/.local/share 14 | environment: 15 | GROUP_ID: 1000 16 | USER_ID: 0 17 | TZ: Asia/Hong_Kong 18 | 19 | # Enable image/container auto update 20 | watchtower: 21 | image: containrrr/watchtower 22 | container_name: watchtower 23 | volumes: 24 | - /var/run/docker.sock:/var/run/docker.sock 25 | environment: 26 | TZ: Asia/Shanghai 27 | command: --interval 3600 tinymediamanager-v5 --cleanup 28 | -------------------------------------------------------------------------------- /.github/workflows/tag.yml: -------------------------------------------------------------------------------- 1 | name: Tag 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | toBeTagAsLatestV5: 6 | description: 'The image tag which will be tag as latest-v5' 7 | required: true 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Login to DockerHub 14 | uses: docker/login-action@v1 15 | with: 16 | username: ${{ secrets.DOCKERHUB_USERNAME }} 17 | password: ${{ secrets.DOCKERHUB_TOKEN }} 18 | - name: Pull and push image 19 | run: | 20 | docker pull dzhuang/tinymediamanager:${{ github.event.inputs.toBeTagAsLatestV5 }} 21 | docker tag dzhuang/tinymediamanager:${{ github.event.inputs.toBeTagAsLatestV5 }} ${{ secrets.DOCKERHUB_USERNAME }}/tinymediamanager:latest-v5 22 | docker push dzhuang/tinymediamanager:latest-v5 23 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | tmmVersion: 6 | description: 'Version of tmm.jar' 7 | required: true 8 | default: '5.0' 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Build image 15 | uses: actions/checkout@v2 16 | - name: Login to DockerHub 17 | uses: docker/login-action@v1 18 | with: 19 | username: ${{ secrets.DOCKERHUB_USERNAME }} 20 | password: ${{ secrets.DOCKERHUB_TOKEN }} 21 | - name: Build and push 22 | uses: docker/build-push-action@v2 23 | with: 24 | context: . 25 | build-args: | 26 | TMM_VERSION=${{ github.event.inputs.tmmVersion }} 27 | tags: dzhuang/tinymediamanager:v${{ github.event.inputs.tmmVersion }} 28 | push: true 29 | -------------------------------------------------------------------------------- /rootfs/etc/cont-init.d/tmm.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv sh 2 | 3 | set -e # Exit immediately if a command exits with a non-zero status. 4 | set -u # Treat unset variables as an error. 5 | 6 | log() { 7 | echo "[cont-init.d] $(basename $0): $*" 8 | } 9 | 10 | # Make sure mandatory directories exist. 11 | mkdir -p /config/logs 12 | 13 | if [ ! -f /config/tmm.jar ] || [ ! -f /config/tmm.tar.xz ] || ! cmp /defaults/tmm.tar.xz /config/tmm.tar.xz; then 14 | cp -r /defaults/* /config/ 15 | cd /config 16 | tar --strip-components=1 -xJf /config/tmm.tar.xz 17 | fi 18 | 19 | # Take ownership of the config directory content. 20 | chown -R $USER_ID:$GROUP_ID /config/* 21 | 22 | # Take ownership of the output directory. 23 | #if ! chown $USER_ID:$GROUP_ID /output; then 24 | # Failed to take ownership of /output. This could happen when, 25 | # for example, the folder is mapped to a network share. 26 | # Continue if we have write permission, else fail. 27 | # if s6-setuidgid $USER_ID:$GROUP_ID [ ! -w /output ]; then 28 | # log "ERROR: Failed to take ownership and no write permission on /output." 29 | # exit 1 30 | # fi 31 | #fi 32 | 33 | # vim: set ft=sh : 34 | -------------------------------------------------------------------------------- /rootfs/startapp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -u # Treat unset variables as an error. 4 | 5 | trap "exit" TERM QUIT INT 6 | trap "kill_tmm" EXIT 7 | 8 | log() { 9 | echo "[tmmsupervisor] $*" 10 | } 11 | 12 | getpid_tmm() { 13 | PID=UNSET 14 | if [ -f /config/tmm.pid ]; then 15 | PID="$(cat /config/tmm.pid)" 16 | # Make sure the saved PID is still running and is associated to 17 | # TinyMediaManager. 18 | if [ ! -f /proc/$PID/cmdline ] || ! cat /proc/$PID/cmdline | grep -qw "tmm.jar"; then 19 | PID=UNSET 20 | fi 21 | fi 22 | if [ "$PID" = "UNSET" ]; then 23 | PID="$(ps -o pid,args | grep -w "/config/tinyMediaManager" | grep -vw grep | tr -s ' ' | cut -d' ' -f2)" 24 | fi 25 | echo "${PID:-UNSET}" 26 | } 27 | 28 | is_tmm_running() { 29 | [ "$(getpid_tmm)" != "UNSET" ] 30 | } 31 | 32 | start_tmm() { 33 | /config/tinyMediaManager > /config/logs/output.log 2>&1 & 34 | } 35 | 36 | kill_tmm() { 37 | PID="$(getpid_tmm)" 38 | if [ "$PID" != "UNSET" ]; then 39 | log "Terminating TinyMediaManager..." 40 | kill $PID 41 | wait $PID 42 | fi 43 | } 44 | 45 | if ! is_tmm_running; then 46 | log "TinyMediaManager not started yet. Proceeding..." 47 | start_tmm 48 | fi 49 | 50 | TMM_NOT_RUNNING=0 51 | while [ "$TMM_NOT_RUNNING" -lt 60 ] 52 | do 53 | if is_tmm_running; then 54 | TMM_NOT_RUNNING=0 55 | else 56 | TMM_NOT_RUNNING="$(expr $TMM_NOT_RUNNING + 1)" 57 | fi 58 | sleep 1 59 | done 60 | 61 | log "TinyMediaManager no longer running. Exiting..." 62 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # TinyMediaManager Dockerfile 3 | # 4 | FROM jlesage/baseimage-gui:alpine-3.12-glibc 5 | 6 | # Define software versions. 7 | ARG TMM_VERSION=5.0 8 | 9 | # Define software download URLs. 10 | ARG TMM_URL=https://release.tinymediamanager.org/v5/dist/tinyMediaManager-${TMM_VERSION}-linux-amd64.tar.xz 11 | ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jre/bin 12 | 13 | # Define working directory. 14 | WORKDIR /tmp 15 | 16 | # Download TinyMediaManager 17 | RUN \ 18 | mkdir -p /defaults && \ 19 | wget ${TMM_URL} -O /defaults/tmm.tar.xz 20 | 21 | # Install dependencies. 22 | RUN \ 23 | apk add --update \ 24 | libmediainfo \ 25 | ttf-dejavu \ 26 | bash \ 27 | zenity \ 28 | tar \ 29 | zstd \ 30 | fontconfig \ 31 | ttf-dejavu 32 | 33 | 34 | # Fix Java Segmentation Fault 35 | RUN wget "https://www.archlinux.org/packages/core/x86_64/zlib/download" -O /tmp/libz.tar.xz \ 36 | && mkdir -p /tmp/libz \ 37 | && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ 38 | && cp /tmp/libz/usr/lib/libz.so.1.3.1 /usr/glibc-compat/lib \ 39 | && /usr/glibc-compat/sbin/ldconfig \ 40 | && rm -rf /tmp/libz /tmp/libz.tar.xz 41 | 42 | # Maximize only the main/initial window. 43 | # It seems this is not needed for TMM 3.X version. 44 | #RUN \ 45 | # sed-patch 's///' \ 46 | # /etc/xdg/openbox/rc.xml 47 | 48 | # Generate and install favicons. 49 | RUN \ 50 | APP_ICON_URL=https://gitlab.com/tinyMediaManager/tinyMediaManager/raw/45f9c702615a55725a508523b0524166b188ff75/AppBundler/tmm.png && \ 51 | install_app_icon.sh "$APP_ICON_URL" 52 | 53 | 54 | # Install Chinese fonts 55 | RUN wget -O /tmp/font.tar.gz http://downloads.sourceforge.net/wqy/wqy-zenhei-0.9.45.tar.gz && \ 56 | tar -xzvf /tmp/font.tar.gz -C /tmp/ && \ 57 | mkdir -p /usr/share/fonts/truetype/wqy && \ 58 | cp /tmp/wqy-zenhei/wqy-zenhei.ttc /usr/share/fonts/truetype/wqy/ && \ 59 | fc-cache -f -v && \ 60 | rm -rf /tmp/font.tar.gz /tmp/wqy-zenhei 61 | 62 | # Add files. 63 | COPY rootfs/ / 64 | COPY VERSION / 65 | 66 | # Set environment variables. 67 | ENV APP_NAME="TinyMediaManager" \ 68 | S6_KILL_GRACETIME=8000 69 | 70 | # Define mountable directories. 71 | VOLUME ["/config"] 72 | VOLUME ["/media"] 73 | 74 | # Metadata. 75 | LABEL \ 76 | org.label-schema.name="tinymediamanager" \ 77 | org.label-schema.description="Docker container for TinyMediaManager" \ 78 | org.label-schema.version="unknown" \ 79 | org.label-schema.vcs-url="https://github.com/dzhuang/tinymediamanager5-docker" \ 80 | org.label-schema.schema-version="1.0" 81 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tinymediamanager5-docker 2 | 3 | 4 | ### [中文说明](https://github.com/dzhuang/tinymediamanager5-docker/wiki/%E4%B8%AD%E6%96%87%E8%AF%B4%E6%98%8E) 5 | 6 | ![docker pulls](https://img.shields.io/docker/pulls/dzhuang/tinymediamanager.svg) ![docker stars](https://img.shields.io/docker/stars/dzhuang/tinymediamanager.svg) 7 | 8 | Latest versions: 9 | ![Docker Image Version (tag latest semver)](https://img.shields.io/docker/v/dzhuang/tinymediamanager/latest-v5) ![docker size](https://img.shields.io/docker/image-size/dzhuang/tinymediamanager/latest-v5) 10 | 11 | This repository is dedicated to creating a Docker container featuring TinyMediaManager with a GUI interface, enhanced with both Chinese and Japanese font support. 12 | 13 | ```bash 14 | docker pull dzhuang/tinymediamanager:latest-v5 15 | ``` 16 | 17 | ### Important Notice for Version Upgrades 18 | 19 | Before upgrading from an older version (e.g., 3.x to 4.x, 3.x to 5.x, or 4.x to 5.x), it is imperative to safeguard your configuration settings. Please ensure you have backed up your `/config` directory thoroughly. This precaution is essential to protect your settings and preferences during the upgrade process. 20 | 21 | ## Why Choose This Over the Official Docker Image? 22 | 23 | Our Docker image, is significantly more compact than the official Docker images (150M vs. 300M+ as image, 230M vs. 800M when extracted). This leaner size leads to reduced system resource consumption, offering users a more efficient and streamlined experience. Opt for this image if you prioritize optimal resource management and performance in your system. 24 | 25 | ## Features 26 | - Out-of-the-box support for Chinese and Japanese fonts (中文支持开箱即用). 27 | - A quick resolution for the [bug](https://github.com/dzhuang/tinymediamanager-docker/issues/13) where changes in the image version did not reflect in running containers. (修复image升级/变化后,容器实际运行的tmm版本未变化的[bug](https://github.com/dzhuang/tinymediamanager-docker/issues/13)). 28 | - A demonstrative Docker Compose file enabling container auto-upgrades (支持自动升级版本的docker compose示例文件). 29 | 30 | For utilizing this build, use `dzhuang/tinymediamanager:latest-v5`. 31 | 32 | Instructions: 33 | - Map any local port to 5800 for web access. 34 | - Map any local port to 5900 for VNC access. 35 | - Map a local volume to `/config` to store configuration data. 36 | - Map a local volume to `/media` for accessing media files. 37 | 38 | Sample Run Command: 39 | 40 | ```bash 41 | docker run -d --name=tinymediamanager \ 42 | -v /share/Container/tinymediamanager/config:/config \ 43 | -v /share/Container/tinymediamanager/media:/media \ 44 | -e GROUP_ID=0 -e USER_ID=0 -e TZ=Europe/Madrid \ 45 | -p 5800:5800 \ 46 | -p 5900:5900 \ 47 | dzhuang/tinymediamanager:latest-v5 48 | ``` 49 | 50 | Browse to `http://your-host-ip:5800` to access the TinyMediaManager GUI. 51 | 52 | ### Image TAGs available 53 | 54 | | TAG | Description | 55 | |-----------|----------------------------------------------| 56 | |`latest-v5`| Latest available version of **TMM v5**.| 57 | |`vX.X.X` | Points directly to one of the TMM versions available | 58 | 59 | ### Environment Variables 60 | 61 | To customize some properties of the container, the following environment 62 | variables can be passed via the `-e` parameter (one for each variable). Value 63 | of this parameter has the format `=`. 64 | 65 | | Variable | Description | Default | 66 | |----------------|----------------------------------------------|---------| 67 | |`USER_ID`| ID of the user the application runs as. See [User/Group IDs](#usergroup-ids) to better understand when this should be set. | `1000` | 68 | |`GROUP_ID`| ID of the group the application runs as. See [User/Group IDs](#usergroup-ids) to better understand when this should be set. | `1000` | 69 | |`SUP_GROUP_IDS`| Comma-separated list of supplementary group IDs of the application. | (unset) | 70 | |`UMASK`| Mask that controls how file permissions are set for newly created files. The value of the mask is in octal notation. By default, this variable is not set and the default umask of `022` is used, meaning that newly created files are readable by everyone, but only writable by the owner. See the following online umask calculator: http://wintelguy.com/umask-calc.pl | (unset) | 71 | |`TZ`| [TimeZone] of the container. Timezone can also be set by mapping `/etc/localtime` between the host and the container. | `Etc/UTC` | 72 | |`KEEP_APP_RUNNING`| When set to `1`, the application will be automatically restarted if it crashes or if user quits it. | `0` | 73 | |`APP_NICENESS`| Priority at which the application should run. A niceness value of -20 is the highest priority and 19 is the lowest priority. By default, niceness is not set, meaning that the default niceness of 0 is used. **NOTE**: A negative niceness (priority increase) requires additional permissions. In this case, the container should be run with the docker option `--cap-add=SYS_NICE`. | (unset) | 74 | |`CLEAN_TMP_DIR`| When set to `1`, all files in the `/tmp` directory are delete during the container startup. | `1` | 75 | |`DISPLAY_WIDTH`| Width (in pixels) of the application's window. | `1280` | 76 | |`DISPLAY_HEIGHT`| Height (in pixels) of the application's window. | `768` | 77 | |`SECURE_CONNECTION`| When set to `1`, an encrypted connection is used to access the application's GUI (either via web browser or VNC client). See the [Security](#security) section for more details. | `0` | 78 | |`VNC_PASSWORD`| Password needed to connect to the application's GUI. See the [VNC Password](#vnc-password) section for more details. | (unset) | 79 | |`X11VNC_EXTRA_OPTS`| Extra options to pass to the x11vnc server running in the Docker container. **WARNING**: For advanced users. Do not use unless you know what you are doing. | (unset) | 80 | 81 | ### Data Volumes 82 | 83 | The following table describes data volumes used by the container. The mappings 84 | are set via the `-v` parameter. Each mapping is specified with the following 85 | format: `:[:PERMISSIONS]`. 86 | 87 | | Container path | Permissions | Description | 88 | |-----------------|-------------|-------------| 89 | |`/config`| rw | This is where the application stores its configuration, log and any files needing persistency. | 90 | |`/media`| rw | This is where your media files are stored. | 91 | 92 | ### Ports 93 | 94 | Here is the list of ports used by the container. They can be mapped to the host 95 | via the `-p` parameter (one per port mapping). Each mapping is defined in the 96 | following format: `:`. The port number inside the 97 | container cannot be changed, but you are free to use any port on the host side. 98 | 99 | | Port | Mapping to host | Description | 100 | |------|-----------------|-------------| 101 | | 5800 | Mandatory | Port used to access the application's GUI via the web interface. | 102 | | 5900 | Optional | Port used to access the application's GUI via the VNC protocol. Optional if no VNC client is used. | 103 | 104 | ## User/Group IDs 105 | 106 | When using data volumes (`-v` flags), permissions issues can occur between the 107 | host and the container. For example, the user within the container may not 108 | exists on the host. This could prevent the host from properly accessing files 109 | and folders on the shared volume. 110 | 111 | To avoid any problem, you can specify the user the application should run as. 112 | 113 | This is done by passing the user ID and group ID to the container via the 114 | `USER_ID` and `GROUP_ID` environment variables. 115 | 116 | To find the right IDs to use, issue the following command on the host, with the 117 | user owning the data volume on the host: 118 | 119 | id 120 | 121 | Which gives an output like this one: 122 | ``` 123 | uid=1000(myuser) gid=1000(myuser) groups=1000(myuser),4(adm),24(cdrom),27(sudo),46(plugdev),113(lpadmin) 124 | ``` 125 | 126 | The value of `uid` (user ID) and `gid` (group ID) are the ones that you should 127 | be given the container. 128 | 129 | ## Security 130 | 131 | By default, access to the application's GUI is done over an unencrypted 132 | connection (HTTP or VNC). 133 | 134 | Secure connection can be enabled via the `SECURE_CONNECTION` environment 135 | variable. See the [Environment Variables](#environment-variables) section for 136 | more details on how to set an environment variable. 137 | 138 | When enabled, application's GUI is performed over an HTTPs connection when 139 | accessed with a browser. All HTTP accesses are automatically redirected to 140 | HTTPs. 141 | 142 | When using a VNC client, the VNC connection is performed over SSL. Note that 143 | few VNC clients support this method. [SSVNC] is one of them. 144 | 145 | [SSVNC]: http://www.karlrunge.com/x11vnc/ssvnc.html 146 | 147 | ### Certificates 148 | 149 | Here are the certificate files needed by the container. By default, when they 150 | are missing, self-signed certificates are generated and used. All files have 151 | PEM encoded, x509 certificates. 152 | 153 | | Container Path | Purpose | Content | 154 | |---------------------------------|----------------------------|---------| 155 | |`/config/certs/vnc-server.pem` |VNC connection encryption. |VNC server's private key and certificate, bundled with any root and intermediate certificates.| 156 | |`/config/certs/web-privkey.pem` |HTTPs connection encryption.|Web server's private key.| 157 | |`/config/certs/web-fullchain.pem`|HTTPs connection encryption.|Web server's certificate, bundled with any root and intermediate certificates.| 158 | 159 | **NOTE**: To prevent any certificate validity warnings/errors from the browser 160 | or VNC client, make sure to supply your own valid certificates. 161 | 162 | **NOTE**: Certificate files are monitored and relevant daemons are automatically 163 | restarted when changes are detected. 164 | 165 | ### VNC Password 166 | 167 | To restrict access to your application, a password can be specified. This can 168 | be done via two methods: 169 | * By using the `VNC_PASSWORD` environment variable. 170 | * By creating a `.vncpass_clear` file at the root of the `/config` volume. 171 | This file should contains the password in clear-text. During the container 172 | startup, content of the file is obfuscated and moved to `.vncpass`. 173 | 174 | The level of security provided by the VNC password depends on two things: 175 | * The type of communication channel (encrypted/unencrypted). 176 | * How secure access to the host is. 177 | 178 | When using a VNC password, it is highly desirable to enable the secure 179 | connection to prevent sending the password in clear over an unencrypted channel. 180 | 181 | **ATTENTION**: Password is limited to 8 characters. This limitation comes from 182 | the Remote Framebuffer Protocol [RFC](https://tools.ietf.org/html/rfc6143) (see 183 | section [7.2.2](https://tools.ietf.org/html/rfc6143#section-7.2.2)). Any 184 | characters beyhond the limit are ignored. 185 | 186 | ## Shell Access 187 | 188 | To get shell access to a the running container, execute the following command: 189 | 190 | ``` 191 | docker exec -ti CONTAINER sh 192 | ``` 193 | 194 | Where `CONTAINER` is the ID or the name of the container used during its 195 | creation (e.g. `crashplan-pro`). 196 | 197 | ## Reverse Proxy 198 | 199 | The following sections contains NGINX configuration that need to be added in 200 | order to reverse proxy to this container. 201 | 202 | A reverse proxy server can route HTTP requests based on the hostname or the URL 203 | path. 204 | 205 | ### Routing Based on Hostname 206 | 207 | In this scenario, each hostname is routed to a different application/container. 208 | 209 | For example, let's say the reverse proxy server is running on the same machine 210 | as this container. The server would proxy all HTTP requests sent to 211 | `tinymediamanager.domain.tld` to the container at `127.0.0.1:5800`. 212 | 213 | Here are the relevant configuration elements that would be added to the NGINX 214 | configuration: 215 | 216 | ``` 217 | map $http_upgrade $connection_upgrade { 218 | default upgrade; 219 | '' close; 220 | } 221 | 222 | upstream tinymediamanager { 223 | # If the reverse proxy server is not running on the same machine as the 224 | # Docker container, use the IP of the Docker host here. 225 | # Make sure to adjust the port according to how port 5800 of the 226 | # container has been mapped on the host. 227 | server 127.0.0.1:5800; 228 | } 229 | 230 | server { 231 | [...] 232 | 233 | server_name tinymediamanager.domain.tld; 234 | 235 | location / { 236 | proxy_pass http://tinymediamanager; 237 | } 238 | 239 | location /websockify { 240 | proxy_pass http://tinymediamanager; 241 | proxy_http_version 1.1; 242 | proxy_set_header Upgrade $http_upgrade; 243 | proxy_set_header Connection $connection_upgrade; 244 | proxy_read_timeout 86400; 245 | } 246 | } 247 | 248 | ``` 249 | 250 | ### Routing Based on URL Path 251 | 252 | In this scenario, the hostname is the same, but different URL paths are used to 253 | route to different applications/containers. 254 | 255 | For example, let's say the reverse proxy server is running on the same machine 256 | as this container. The server would proxy all HTTP requests for 257 | `server.domain.tld/tinymediamanager` to the container at `127.0.0.1:5800`. 258 | 259 | Here are the relevant configuration elements that would be added to the NGINX 260 | configuration: 261 | 262 | ``` 263 | map $http_upgrade $connection_upgrade { 264 | default upgrade; 265 | '' close; 266 | } 267 | 268 | upstream tinymediamanager { 269 | # If the reverse proxy server is not running on the same machine as the 270 | # Docker container, use the IP of the Docker host here. 271 | # Make sure to adjust the port according to how port 5800 of the 272 | # container has been mapped on the host. 273 | server 127.0.0.1:5800; 274 | } 275 | 276 | server { 277 | [...] 278 | 279 | location = /tinymediamanager {return 301 $scheme://$http_host/tinymediamanager/;} 280 | location /tinymediamanager/ { 281 | proxy_pass http://tinymediamanager/; 282 | location /tinymediamanager/websockify { 283 | proxy_pass http://tinymediamanager/websockify/; 284 | proxy_http_version 1.1; 285 | proxy_set_header Upgrade $http_upgrade; 286 | proxy_set_header Connection $connection_upgrade; 287 | proxy_read_timeout 86400; 288 | } 289 | } 290 | } 291 | 292 | ``` 293 | 294 | [TimeZone]: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones 295 | 296 | --------------------------------------------------------------------------------