質問編集履歴

4

修正

2018/04/09 18:02

投稿

takai
takai

スコア8

test CHANGED
File without changes
test CHANGED
@@ -167,3 +167,67 @@
167
167
  es_plugins:
168
168
 
169
169
  ```
170
+
171
+
172
+
173
+
174
+
175
+ Dockerfile
176
+
177
+ ```
178
+
179
+ FROM weseek/growi:3
180
+
181
+
182
+
183
+ ENV APP_DIR /opt/growi
184
+
185
+
186
+
187
+ # install dockerize
188
+
189
+ ENV DOCKERIZE_VERSION v0.5.0
190
+
191
+ RUN apk add --no-cache --virtual .dl-deps curl \
192
+
193
+ && curl -SL https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
194
+
195
+ | tar -xz -C /usr/local/bin \
196
+
197
+ && apk del .dl-deps
198
+
199
+
200
+
201
+ WORKDIR ${APP_DIR}
202
+
203
+
204
+
205
+ # install plugins if necessary
206
+
207
+ # ;;
208
+
209
+ # ;; NOTE: In GROWI v3 and later,
210
+
211
+ # ;; 2 of official plugins (growi-plugin-lsx and growi-plugin-pukiwiki-like-linker)
212
+
213
+ # ;; are now included in the 'weseek/growi' image.
214
+
215
+ # ;; Therefore you will not need following lines except when you install third-party plugins.
216
+
217
+ # ;;
218
+
219
+ #RUN echo "install plugins" \
220
+
221
+ # && yarn add \
222
+
223
+ # growi-plugin-XXX \
224
+
225
+ # growi-plugin-YYY \
226
+
227
+ # && echo "done."
228
+
229
+ # you must rebuild if install plugin at least one
230
+
231
+ # RUN npm run build:prod
232
+
233
+ ```

3

修正

2018/04/09 18:02

投稿

takai
takai

スコア8

test CHANGED
File without changes
test CHANGED
@@ -64,7 +64,7 @@
64
64
 
65
65
  environment:
66
66
 
67
- - "TZ=/usr/share/zoneinfo/Asia/Tokyo"
67
+ - "TZ=Asia/Tokyo"
68
68
 
69
69
  - MONGO_URI=mongodb://mongo:27017/growi
70
70
 
@@ -128,7 +128,7 @@
128
128
 
129
129
  - "ES_JAVA_OPTS=-Xms256m -Xmx256m" # increase amount if you have enough memory
130
130
 
131
- - "TZ=/usr/share/zoneinfo/Asia/Tokyo"
131
+ - "TZ=Asia/Tokyo"
132
132
 
133
133
  command:
134
134
 

2

追記

2018/04/09 17:56

投稿

takai
takai

スコア8

test CHANGED
File without changes
test CHANGED
@@ -19,3 +19,151 @@
19
19
 
20
20
 
21
21
  何もしなければ、コンテナのtimezoneはUTCです。
22
+
23
+
24
+
25
+
26
+
27
+ docker-compose.yml
28
+
29
+ ```
30
+
31
+ version: '3'
32
+
33
+
34
+
35
+ services:
36
+
37
+ app:
38
+
39
+ build:
40
+
41
+ context: .
42
+
43
+ dockerfile: ./Dockerfile
44
+
45
+ ports:
46
+
47
+ - 127.0.0.1:3000:3000 # localhost only by default
48
+
49
+ links:
50
+
51
+ - mongo:mongo
52
+
53
+ - redis:redis
54
+
55
+ - elasticsearch:elasticsearch
56
+
57
+ depends_on:
58
+
59
+ - mongo
60
+
61
+ - redis
62
+
63
+ - elasticsearch
64
+
65
+ environment:
66
+
67
+ - "TZ=/usr/share/zoneinfo/Asia/Tokyo"
68
+
69
+ - MONGO_URI=mongodb://mongo:27017/growi
70
+
71
+ - REDIS_URL=redis://redis:6379/growi
72
+
73
+ - ELASTICSEARCH_URI=http://elasticsearch:9200/growi
74
+
75
+ - PASSWORD_SEED=changeme
76
+
77
+ # - FILE_UPLOAD=local # activate this line if you use local storage of server rather than AWS
78
+
79
+ # - MATHJAX=1 # activate this line if you want to use MathJax
80
+
81
+ # - PLANTUML_URI=http:// # activate this line and specify if you use your own PlantUML server rather than public plantuml.com
82
+
83
+ command: "dockerize
84
+
85
+ -wait tcp://mongo:27017
86
+
87
+ -wait tcp://redis:6379
88
+
89
+ -wait tcp://elasticsearch:9200
90
+
91
+ -timeout 60s
92
+
93
+ npm run server:prod"
94
+
95
+ volumes:
96
+
97
+ - growi_data:/data
98
+
99
+
100
+
101
+ mongo:
102
+
103
+ image: mongo:3.4
104
+
105
+ volumes:
106
+
107
+ - mongo_configdb:/data/configdb
108
+
109
+ - mongo_db:/data/db
110
+
111
+
112
+
113
+ redis:
114
+
115
+ image: redis:3-alpine
116
+
117
+ volumes:
118
+
119
+ - redis_data:/data
120
+
121
+
122
+
123
+ elasticsearch:
124
+
125
+ image: elasticsearch:5.3-alpine
126
+
127
+ environment:
128
+
129
+ - "ES_JAVA_OPTS=-Xms256m -Xmx256m" # increase amount if you have enough memory
130
+
131
+ - "TZ=/usr/share/zoneinfo/Asia/Tokyo"
132
+
133
+ command:
134
+
135
+ - sh
136
+
137
+ - -c
138
+
139
+ - "./bin/elasticsearch-plugin list | grep -q analysis-kuromoji || ./bin/elasticsearch-plugin install analysis-kuromoji;
140
+
141
+ ./bin/elasticsearch-plugin list | grep -q analysis-icu || ./bin/elasticsearch-plugin install analysis-icu;
142
+
143
+ /docker-entrypoint.sh elasticsearch"
144
+
145
+ volumes:
146
+
147
+ - es_data:/usr/share/elasticsearch/data
148
+
149
+ - es_plugins:/usr/share/elasticsearch/plugins
150
+
151
+ - ./esconfig:/usr/share/elasticsearch/config
152
+
153
+
154
+
155
+ volumes:
156
+
157
+ growi_data:
158
+
159
+ mongo_configdb:
160
+
161
+ mongo_db:
162
+
163
+ redis_data:
164
+
165
+ es_data:
166
+
167
+ es_plugins:
168
+
169
+ ```

1

修正

2018/04/09 17:55

投稿

takai
takai

スコア8

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  Centos7(64bit)上で、dockerを使いコンテナを作成していますが
2
2
 
3
- コンテナのtimezoneをJSTするには、どのようにすればいいでしょうか。
3
+ コンテナのtimezoneをUTCからJSTへ変更するには、どのようにすればいいでしょうか。
4
4
 
5
5
 
6
6