mirror of
https://github.com/spacebarchat/spacebarchat.git
synced 2024-11-08 19:52:36 +01:00
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
version: "3"
|
|
services:
|
|
fosscord-gateway:
|
|
container_name: gateway
|
|
restart: always
|
|
build: gateway
|
|
ports:
|
|
- "3002:3002"
|
|
links:
|
|
- mongo
|
|
env_file: ./.docker/env
|
|
fosscord-api:
|
|
container_name: api
|
|
restart: always
|
|
build: api
|
|
ports:
|
|
- "3001:3001"
|
|
links:
|
|
- mongo
|
|
env_file: ./.docker/env
|
|
mongo:
|
|
container_name: mongo
|
|
image: mongo
|
|
volumes:
|
|
- ./.docker/data:/data/db
|
|
- ./.docker/mongodb/mongod.conf:/etc/mongod.conf
|
|
ports:
|
|
- "27017:27017"
|
|
command: mongod --replSet rs0
|
|
mongo-init-replica:
|
|
image: mongo
|
|
command: >
|
|
bash -c
|
|
"for i in `seq 1 30`; do
|
|
mongo mongo/fosscord --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)"
|
|
links:
|
|
- mongo |