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'
services:
myrocketchat:
image: rocketchat/rocket.chat:4.1.2
image: rocketchat/rocket.chat:5.4.1
command: >
bash -c
"for i in `seq 1 30`; do
......@@ -14,32 +14,27 @@ services:
volumes:
- ./myrocketchat/uploads:/app/uploads
environment:
- PORT=3000
- ROOT_URL=https://myrocketchat.momobako.com
- MONGO_URL=mongodb://myrocketchat-mongo:27017/rocketchat
- MONGO_OPLOG_URL=mongodb://myrocketchat-mongo:27017/local?replSet=rs0
PORT: 3000
ROOT_URL: https://myrocketchat.momobako.com
MONGO_URL: mongodb://root:myrootpassword@myrocketchat-mongo:27017/myrocketchat?replicaSet=rs0&directConnection=true&authSource=admin
MONGO_OPLOG_URL: mongodb://root:myrootpassword@myrocketchat-mongo:27017/local?replicaSet=rs0&directConnection=true&authSource=admin
depends_on:
- myrocketchat-mongo
myrocketchat-mongo:
image: mongo:5
image: bitnami/mongodb:6.0.3
restart: always
volumes:
- ./myrocketchat/data/db:/data/db
command: mongod --oplogSize 128 --replSet rs0
myrocketchat-mongo-init-replica:
image: mongo:5
command: >
bash -c
"for i in `seq 1 30`; do
mongo myrocketchat-mongo/rocketchat --eval \"
rs.initiate({
_id: 'rs0',
members: [ { _id: 0, host: 'localhost:27017' } ]})\" &&
s=$$? && break || s=$$?;
echo \"Tried $$i times. Waiting 5 secs...\";
sleep 5;
done; (exit $$s)"
depends_on:
- myrocketchat-mongo
- ./myrocketchat/data/db:/bitnami/mongodb
environment:
MONGODB_REPLICA_SET_MODE: primary
MONGODB_REPLICA_SET_NAME: rs0
MONGODB_REPLICA_SET_KEY: mysetkey
MONGODB_PORT_NUMBER: 27017
MONGODB_INITIAL_PRIMARY_HOST: myrocketchat-mongo
MONGODB_INITIAL_PRIMARY_PORT_NUMBER: 27017
MONGODB_ADVERTISED_HOSTNAME: myrocketchat-mongo
MONGODB_ENABLE_JOURNAL: 'true'
MONGODB_ROOT_USER: root
MONGODB_ROOT_PASSWORD: myrootpassword
MONGODB_DATABASE: myrocketchat
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