GROWI를 docker로 바꾸어보십시오.
10199 단어 letsencryptGrowi도커
전제 조건
letsencrypt + nginx-proxy 설정
$ mkdir -p ~/docker/nginx-proxy
$ cd ~/docker/nginx-proxy
$ vim docker-compose.yml
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
restart: on-failure
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=jwilder/nginx-proxy
ports:
- 80:80
- 443:443
volumes:
- proxy:/etc/nginx/vhost.d
- proxy:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro
network_mode: bridge
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: on-failure
depends_on:
- nginx-proxy
volumes:
- proxy:/etc/nginx/vhost.d
- proxy:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./certs:/etc/nginx/certs:rw
network_mode: bridge
volumes:
proxy:
nginx-proxy 시작
$ docker-compose up -d
install growi-docker-compose
$ cd ~/docker
$ git clone https://github.com/weseek/growi-docker-compose.git growi
$ cd growi
docker-compose.yml 편집
version: '3'
services:
app:
restart: on-failure # [追加]
network_mode: bridge # [追加]
build:
context: .
dockerfile: ./Dockerfile
ports:
- 3000:3000 # [変更]
links:
- mongo:mongo
- elasticsearch:elasticsearch
depends_on:
- mongo
- elasticsearch
environment:
- VIRTUAL_HOST=growi.example.com # [追加] SSLで利用したいFQDN
- LETSENCRYPT_HOST=growi.example.com # [追加] SSLで利用したいFQDN
- [email protected] # [追加] letsencryptに登録するE-Mail
- MONGO_URI=mongodb://mongo:27017/growi
- ELASTICSEARCH_URI=http://elasticsearch:9200/growi
- PASSWORD_SEED=change # [変更] ランダムな64文字に置き換える!!
- FILE_UPLOAD=local
command: "dockerize
-wait tcp://mongo:27017
-wait tcp://elasticsearch:9200
-timeout 60s
npm run server:prod"
volumes:
- growi_data:/data
mongo:
restart: on-failure # [追加]
network_mode: bridge # [追加]
image: mongo:3.4
volumes:
- mongo_configdb:/data/configdb
- mongo_db:/data/db
elasticsearch:
restart: on-failure # [追加]
network_mode: bridge # [追加]
image: elasticsearch:5.3-alpine
environment:
- "ES_JAVA_OPTS=-Xms256m -Xmx256m" # increase amount if you have enough memory
command:
- sh
- -c
- "./bin/elasticsearch-plugin list | grep -q analysis-kuromoji || ./bin/elasticsearch-plugin install analysis-kuromoji;
./bin/elasticsearch-plugin list | grep -q analysis-icu || ./bin/elasticsearch-plugin install analysis-icu;
/docker-entrypoint.sh elasticsearch"
volumes:
- es_data:/usr/share/elasticsearch/data
- es_plugins:/usr/share/elasticsearch/plugins
- ./esconfig:/usr/share/elasticsearch/config
volumes:
growi_data:
mongo_configdb:
mongo_db:
es_data:
es_plugins:
growi-docker-compose 시작
$ docker-compose build
$ docker-compose up -d
마지막으로
잠시 후 브라우저에서 https://${LETSENCRYPT_HOST}/에 액세스하면 growi 로그인 페이지가 표시됩니다.
Reference
이 문제에 관하여(GROWI를 docker로 바꾸어보십시오.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/kopug/items/22081a47d95cf28c2a6a텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)