Spaces:
Runtime error
Runtime error
anuj
commited on
Commit
·
046867d
1
Parent(s):
ad324fc
batman
Browse files- Dockerfile +1 -0
- start.sh +5 -4
Dockerfile
CHANGED
|
@@ -11,6 +11,7 @@ RUN mkdir -p /var/lib/apt/lists/partial && \
|
|
| 11 |
curl \
|
| 12 |
gnupg \
|
| 13 |
supervisor \
|
|
|
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
# Install libssl1.1
|
|
|
|
| 11 |
curl \
|
| 12 |
gnupg \
|
| 13 |
supervisor \
|
| 14 |
+
gosu \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
# Install libssl1.1
|
start.sh
CHANGED
|
@@ -1,13 +1,14 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
# Start MongoDB as mongodb user
|
| 4 |
-
mongod --replSet rs0 --bind_ip_all --dbpath /data/db &
|
| 5 |
|
| 6 |
# Wait for MongoDB to start
|
| 7 |
sleep 10
|
| 8 |
|
| 9 |
# Initialize replica set
|
| 10 |
-
mongosh --eval "rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'localhost:27017'}]})"
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
|
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
# Start MongoDB as mongodb user
|
| 4 |
+
gosu mongodb mongod --replSet rs0 --bind_ip_all --dbpath /data/db &
|
| 5 |
|
| 6 |
# Wait for MongoDB to start
|
| 7 |
sleep 10
|
| 8 |
|
| 9 |
# Initialize replica set
|
| 10 |
+
gosu mongodb mongosh --eval "rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'localhost:27017'}]})"
|
| 11 |
|
| 12 |
+
# Start Rocket.Chat
|
| 13 |
+
cd /app/bundle
|
| 14 |
+
exec gosu rocketchat node main.js
|