Growi
という優れたwikiエンジンでwikiサイト(wiki.tumf.dev
)を立ち上げてみます。Growiはmarkdownで記述でき、かなり高機能で別のところで愛用しています。
こちらのdocker-compose.yml
を参考に、以前の記事1つのサーバにたくさんのWebサービスを詰め込む方法
のサーバにサービスを追加する設定をします。
docker-compose.yml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
| version: '3'
networks:
frontend:
external:
name: front
backend:
services:
app:
build:
context: .
dockerfile: ./Dockerfile
environment:
- MONGO_URI=mongodb://mongo:27017/growi
- ELASTICSEARCH_URI=http://elasticsearch:9200/growi
- PASSWORD_SEED=【ここは変更する】
# - FILE_UPLOAD=mongodb # activate this line if you use MongoDB GridFS rather than AWS
# - FILE_UPLOAD=local # activate this line if you use local storage of server rather than AWS
- MATHJAX=1 # activate this line if you want to use MathJax
#- PLANTUML_URI=https://plantuml.tumf.dev # activate this line and specify if you use your own PlantUML server rather than public plantuml.com
# - HACKMD_URI=https://hackmd.io # activate this line and specify HackMD server URI which can be accessed from GROWI client browsers
# - HACKMD_URI_FOR_SERVER=http://hackmd:3000 # activate this line and specify HackMD server URI which can be accessed from this server container
- FORCE_WIKI_MODE='public' # activate this line to force wiki public mode
# - FORCE_WIKI_MODE='private' # activate this line to force wiki private mode
command: "dockerize
-wait tcp://mongo:27017
-wait tcp://elasticsearch:9200
-timeout 60s
npm run server:prod"
restart: unless-stopped
volumes:
- ./volumes/growi_data:/data
networks:
- frontend
- backend
labels:
- "traefik.http.services.wiki_tumf_dev_s1.loadbalancer.server.port=3000"
- "traefik.http.routers.wiki_tumf_dev.service=wiki_tumf_dev_s1"
- "traefik.http.routers.wiki_tumf_dev.rule=Host(`wiki.tumf.dev`)"
- "traefik.http.routers.wiki_tumf_dev.tls=true"
- "traefik.http.routers.wiki_tumf_dev.tls.certresolver=dnsresolver"
- "traefik.http.routers.wiki_tumf_dev.tls.domains[0].main=wiki.tumf.dev"
mongo:
image: mongo:4.4
restart: unless-stopped
volumes:
- ./volumes/mongodb_data:/data
networks:
- backend
elasticsearch:
build:
context: ./elasticsearch
dockerfile: ./Dockerfile
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms256m -Xmx256m" # increase amount if you have enough memory
ulimits:
memlock:
soft: -1
hard: -1
restart: unless-stopped
volumes:
- ./volumes/es_data:/usr/share/elasticsearch/data
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
networks:
- backend
|
上のPASSWORD_SEED
は何かランダムな文字列
に変更します。そしてdocker-compose up -d
で簡単に立ち上がりました。
サイトを立ち上げてみたものの用途を思いついてないのでそのうち何か考えることにします。