-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
98 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ldc-1.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
default_process_types: | ||
web: ./dub-registry --port $PORT --mirror=https://code.dlang.org --hostname=dub-registry.heroku.com --separate-cron --vv --bind 0.0.0.0 | ||
cron: ./dub-registry --mirror=https://code.dlang.org --run-cron --vv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "DUB registry (mirror)", | ||
"description": "A mirror of code.dlang.org", | ||
"repository": "https://github.com/dub/dub-registry", | ||
"website": "https://github.com/dub/dub-registry", | ||
"logo": "https://dlang.org/images/dlogo_opengraph.png", | ||
"keywords": ["d", "dlang", "dub", "mirror"], | ||
"buildpacks": [ | ||
{ | ||
"url": "http://github.com/MartinNowak/heroku-buildpack-d.git" | ||
} | ||
], | ||
"addons": [ | ||
{ | ||
"plan": "mongolab:sandbox", | ||
"as": "MONGO" | ||
}, | ||
{ | ||
"plan": "scheduler:standard", | ||
"as": "SCHEDULER" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module dubregistry.mongodb; | ||
|
||
import vibe.db.mongo.client : MongoClient; | ||
import vibe.db.mongo.mongo : connectMongoDB; | ||
import vibe.db.mongo.settings : MongoClientSettings, MongoAuthMechanism, parseMongoDBUrl; | ||
|
||
MongoClientSettings mongoSettings; | ||
string databaseName = "vpmreg"; | ||
|
||
shared static this() | ||
{ | ||
import std.process : environment; | ||
auto mongodbURI = environment.get("MONGODB_URI", "mongodb://127.0.0.1"); | ||
parseMongoDBUrl(mongoSettings, mongodbURI); | ||
mongoSettings.authMechanism = MongoAuthMechanism.scramSHA1; | ||
if (mongoSettings.database.length != 0) | ||
databaseName = mongoSettings.database; | ||
mongoSettings.safe = true; | ||
} | ||
|
||
MongoClient getMongoClient() | ||
{ | ||
return connectMongoDB(mongoSettings); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters