Last active
August 16, 2018 05:22
-
-
Save sahya/16993f37ba55e10f8bc40ee5fe4b0757 to your computer and use it in GitHub Desktop.
keycloak-docker-compose (multi service)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# please : git clone https://github.com/weseek/growi-docker-compose.git | |
# special thanks : inductor | |
#------------------------------------ | |
version: '3' | |
services: | |
nginx: | |
container_name: nginx | |
image: jwilder/nginx-proxy | |
restart: always | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
- ./certs:/etc/nginx/certs # ここに証明書を設置する | |
keycloak: | |
container_name: keycloak | |
image: jboss/keycloak:4.0.0.Final | |
restart: always | |
environment: | |
- VIRTUAL_HOST=sts.example.net | |
- CERT_NAME=wildcard.example.net # 使用する証明書名(default.crt, default.keyが使用される。) | |
- KEYCLOAK_USER=admin | |
- KEYCLOAK_PASSWORD=password | |
- PROXY_ADDRESS_FORWARDING=true | |
- DB_VENDOR=MYSQL | |
- DB_ADDR=kcdb | |
- DB_DATABASE=keycloak | |
- DB_PASSWORD=password | |
wordpress: | |
container_name: wordpress | |
image: wordpress:4.9.6-php7.2 | |
restart: always | |
environment: | |
- VIRTUAL_HOST=wp.example.net | |
- CERT_NAME=wildcard.example.net # 使用する証明書名(default.crt, default.keyが使用される。) | |
- WORDPRESS_DB_NAME=wordpress | |
- WORDPRESS_DB_USER=wordpress | |
- WORDPRESS_DB_PASSWORD=password | |
- WORDPRESS_DB_HOST=wpdb | |
wpdb: | |
container_name: wpdb | |
image: mysql:5.7 | |
restart: always | |
environment: | |
- MYSQL_ROOT_PASSWORD=root | |
- MYSQL_DATABASE=wordpress | |
- MYSQL_USER=wordpress | |
- MYSQL_PASSWORD=password | |
kcdb: | |
container_name: kcdb | |
image: mysql:5.7 | |
restart: always | |
environment: | |
- MYSQL_ROOT_PASSWORD=root | |
- MYSQL_DATABASE=keycloak | |
- MYSQL_USER=keycloak | |
- MYSQL_PASSWORD=password | |
growiapp: | |
container_name: growiapp | |
restart: always | |
build: | |
context: . | |
dockerfile: ./growi/Dockerfile | |
links: | |
- growimongo:mongo | |
- growielasticsearch:elasticsearch | |
depends_on: | |
- growimongo | |
- growielasticsearch | |
environment: | |
- VIRTUAL_HOST=wiki.example.net | |
- CERT_NAME=wildcard.example.net # 使用する証明書名(default.crt, default.keyが使用される。) | |
- MONGO_URI=mongodb://mongo:27017/growi | |
- ELASTICSEARCH_URI=http://elasticsearch:9200/growi | |
- PASSWORD_SEED=changeme | |
# - 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=http:// # activate this line and specify if you use your own PlantUML server rather than public plantuml.com | |
command: "dockerize | |
-wait tcp://growimongo:27017 | |
-wait tcp://growielasticsearch:9200 | |
-timeout 60s | |
npm run server:prod" | |
volumes: | |
- growi_data:/data | |
growimongo: | |
container_name: growimongo | |
restart: always | |
image: mongo:3.4 | |
volumes: | |
- mongo_configdb:/data/configdb | |
- mongo_db:/data/db | |
growielasticsearch: | |
container_name: growielasticsearch | |
restart: always | |
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 | |
- ./growi/esconfig:/usr/share/elasticsearch/config | |
volumes: | |
growi_data: | |
mongo_configdb: | |
mongo_db: | |
es_data: | |
es_plugins: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment