Commit 0bc044a9 authored by nanahira's avatar nanahira

rework

parent 50fe1a0a
Pipeline #18800 passed with stages
in 2 minutes and 41 seconds
version: '2.4' version: '2.4'
services: services:
myrocketchat: myrocketchat:
image: rocketchat/rocket.chat:4.1.2 image: rocketchat/rocket.chat:5.4.1
command: > command: >
bash -c bash -c
"for i in `seq 1 30`; do "for i in `seq 1 30`; do
...@@ -14,32 +14,27 @@ services: ...@@ -14,32 +14,27 @@ services:
volumes: volumes:
- ./myrocketchat/uploads:/app/uploads - ./myrocketchat/uploads:/app/uploads
environment: environment:
- PORT=3000 PORT: 3000
- ROOT_URL=https://myrocketchat.momobako.com ROOT_URL: https://myrocketchat.momobako.com
- MONGO_URL=mongodb://myrocketchat-mongo:27017/rocketchat MONGO_URL: mongodb://root:myrootpassword@myrocketchat-mongo:27017/myrocketchat?replicaSet=rs0&directConnection=true&authSource=admin
- MONGO_OPLOG_URL=mongodb://myrocketchat-mongo:27017/local?replSet=rs0 MONGO_OPLOG_URL: mongodb://root:myrootpassword@myrocketchat-mongo:27017/local?replicaSet=rs0&directConnection=true&authSource=admin
depends_on: depends_on:
- myrocketchat-mongo - myrocketchat-mongo
myrocketchat-mongo: myrocketchat-mongo:
image: mongo:5 image: bitnami/mongodb:6.0.3
restart: always restart: always
volumes: volumes:
- ./myrocketchat/data/db:/data/db - ./myrocketchat/data/db:/bitnami/mongodb
command: mongod --oplogSize 128 --replSet rs0 environment:
MONGODB_REPLICA_SET_MODE: primary
myrocketchat-mongo-init-replica: MONGODB_REPLICA_SET_NAME: rs0
image: mongo:5 MONGODB_REPLICA_SET_KEY: mysetkey
command: > MONGODB_PORT_NUMBER: 27017
bash -c MONGODB_INITIAL_PRIMARY_HOST: myrocketchat-mongo
"for i in `seq 1 30`; do MONGODB_INITIAL_PRIMARY_PORT_NUMBER: 27017
mongo myrocketchat-mongo/rocketchat --eval \" MONGODB_ADVERTISED_HOSTNAME: myrocketchat-mongo
rs.initiate({ MONGODB_ENABLE_JOURNAL: 'true'
_id: 'rs0', MONGODB_ROOT_USER: root
members: [ { _id: 0, host: 'localhost:27017' } ]})\" && MONGODB_ROOT_PASSWORD: myrootpassword
s=$$? && break || s=$$?; MONGODB_DATABASE: myrocketchat
echo \"Tried $$i times. Waiting 5 secs...\";
sleep 5;
done; (exit $$s)"
depends_on:
- myrocketchat-mongo
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment