Merge pull request #2164 from bluewave-labs/feat/release-workflow
Feat/release workflow
This commit is contained in:
4 files changed
+8
-36
No files matched your search
Vendored
+6
-5
@@ -18,13 +18,14 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
- mongodb
|
- mongodb
|
||||||
environment:
|
environment:
|
||||||
- DB_CONNECTION_STRING=mongodb://localhost:27017/uptime_db?replicaSet=rs0
|
- DB_CONNECTION_STRING=mongodb://mongodb:27017/uptime_db?replicaSet=rs0
|
||||||
- REDIS_URL="redis://redis:6379"
|
- REDIS_URL=redis://redis:6379
|
||||||
- CLIENT_HOST=http://localhost
|
- CLIENT_HOST=http://localhost
|
||||||
|
- JWT_SECRET=my_secret
|
||||||
# volumes:
|
# volumes:
|
||||||
# - /var/run/docker.sock:/var/run/docker.sock:ro
|
# - /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
redis:
|
redis:
|
||||||
image: bluewaveuptime/uptime_redis:latest
|
image: ghcr.io/bluewave-labs/checkmate:redis-dist
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
@@ -37,11 +38,11 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
start_period: 5s
|
start_period: 5s
|
||||||
mongodb:
|
mongodb:
|
||||||
image: bluewaveuptime/uptime_database_mongo:latest
|
image: ghcr.io/bluewave-labs/checkmate:mongo-dist
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./mongo/data:/data/db
|
- ./mongo/data:/data/db
|
||||||
command: ["mongod", "--quiet"]
|
command: ["mongod", "--quiet", "--replSet", "rs0", "--bind_ip_all"]
|
||||||
ports:
|
ports:
|
||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
var username = process.env.USERNAME_ENV_VAR;
|
|
||||||
var password = process.env.PASSWORD_ENV_VAR;
|
|
||||||
|
|
||||||
db = db.getSiblingDB("uptime_db");
|
|
||||||
|
|
||||||
db.createUser({
|
|
||||||
user: username,
|
|
||||||
pwd: password,
|
|
||||||
roles: [
|
|
||||||
{
|
|
||||||
role: "readWrite",
|
|
||||||
db: "uptime_db",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
print("User uptime_user created successfully");
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
try {
|
|
||||||
const status = rs.status();
|
|
||||||
printjson(status);
|
|
||||||
} catch (e) {
|
|
||||||
if (e.codeName === "NotYetInitialized") {
|
|
||||||
print("Replica set not initialized. Initiating...");
|
|
||||||
rs.initiate({
|
|
||||||
_id: "rs0",
|
|
||||||
members: [{ _id: 0, host: "mongodb:27017" }],
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
print("Unexpected error during rs.status():");
|
|
||||||
printjson(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -55,6 +55,8 @@ class SettingsService {
|
|||||||
this.settings[key] = dbSettings[key];
|
this.settings[key] = dbSettings[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await this.appSettings.updateOne({}, { $set: this.settings }, { upsert: true });
|
||||||
return this.settings;
|
return this.settings;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
error.service === undefined ? (error.service = SERVICE_NAME) : null;
|
error.service === undefined ? (error.service = SERVICE_NAME) : null;
|
||||||
|
|||||||
Reference in new issue
Block a user