Created
June 9, 2017 10:54
-
-
Save nicklegr/fea1162838ef9b54e0d7a9195623fbda to your computer and use it in GitHub Desktop.
Crowi-plusのDocker設定
This file contains hidden or 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
| app: | |
| build: . | |
| ports: | |
| - "50010:3000" | |
| links: | |
| - mongo:mongo | |
| - redis:redis | |
| - elasticsearch:elasticsearch | |
| environment: | |
| - MONGO_URI=mongodb://mongo:27017/crowi | |
| - REDIS_URL=redis://redis:6379/crowi | |
| - ELASTICSEARCH_URI=http://elasticsearch:9200/crowi | |
| - PASSWORD_SEED=changeme | |
| - FILE_UPLOAD=local | |
| # TODO: volumes/crowi_data/uploadsを作成しないと動かない | |
| command: "dockerize | |
| -wait tcp://mongo:27017 | |
| -wait tcp://redis:6379 | |
| -wait tcp://elasticsearch:9200 | |
| -timeout 180s | |
| npm run server:prod:container" | |
| restart: always | |
| volumes: | |
| - ./volumes/crowi_data:/data | |
| mongo: | |
| image: mongo:3.4 | |
| restart: always | |
| volumes: | |
| - ./volumes/mongo_configdb:/data/configdb | |
| - ./volumes/mongo_db:/data/db | |
| redis: | |
| image: redis:3-alpine | |
| restart: always | |
| volumes: | |
| - ./volumes/redis_data:/data | |
| elasticsearch: | |
| image: elasticsearch:5.3-alpine | |
| 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" | |
| environment: | |
| - ES_JAVA_OPTS=-DproxyHost=example.com -DproxyPort=8080 | |
| restart: always | |
| volumes: | |
| - ./volumes/es_data:/usr/share/elasticsearch/data | |
| - ./volumes/es_plugins:/usr/share/elasticsearch/plugins | |
| - ./esconfig:/usr/share/elasticsearch/config |
This file contains hidden or 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
| FROM weseek/crowi-plus:1.2.2 | |
| ENV APP_DIR /opt/crowi-plus | |
| # install dockerize | |
| ENV DOCKERIZE_VERSION v0.3.0 | |
| RUN apk add --no-cache --virtual .dl-deps curl \ | |
| && curl -SL https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ | |
| | tar -xz -C /usr/local/bin \ | |
| && apk del .dl-deps | |
| WORKDIR ${APP_DIR} | |
| # Corresponds to `FILE_UPLOAD=local` | |
| RUN mkdir -p /data/uploads \ | |
| && ln -s /data/uploads $APP_DIR/public/uploads | |
| # install plugins if necessary | |
| RUN echo "install plugins" \ | |
| && npm install --save \ | |
| crowi-plugin-lsx \ | |
| crowi-plugin-pukiwiki-like-linker \ | |
| && echo "done." | |
| # you must rebuild if install plugin at least one | |
| RUN npm run build:prod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment