1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| version: '3'
| services:
| jobs:
| restart: always
| image: tomcat:8
| container_name: fanli-job1
| ports:
| - "9081:8080"
| - "9991:9999"
| volumes:
| - "/usr/local/docker/fanli-job1/webapps:/usr/local/tomcat/webapps"
| - "/root/logs/fanli-job1:/usr/local/tomcat/logs"
| command:
| - /bin/bash
| - -c
| - |
| cd /usr/local/tomcat/bin
| if [ $(grep -o "Duser.timezone" catalina.sh |wc -l) -le 0 ] ;then
| #sed -i '127i\JAVA_OPTS=\"-Duser.timezone=GMT+08\"' catalina.sh
| fi
|
| logging:
| driver: "json-file"
| options:
| max-size: "1g"
|
|