Docker Compose file and other configuration files for Anomaly Server
There are 3 configurations that should be changed before running the server. These are:
-
The
docker-compose.ymlfile -
The
Caddy/CaddyFilefile -
The
docker-entrypoint-initdb.d/mongo-initfile -
Inside
docker-compose.ymlfileMONGO_INITDB_ROOT_USERNAMEandMONGO_INITDB_ROOT_PASSWORDenvironment variables should be changed to the username and password of the root user of the MongoDB database.
Environment:
- MONGO_INITDB_ROOT_USERNAME=root ## CHANGE THIS
- MONGO_INITDB_ROOT_PASSWORD=example ## CHANGE THIS- The Caddyfile should look loke this:
changeThisToYourDomain.com { {
reverse_proxy /graphql dockerIP:4000
## if nothing else was chaged inside of the docker-compose.yml file, then the dockerIP should be: anomolyserver
}- The
docker-entrypoint-initdb.d/mongo-initfile should be changed to the following:
Only change the credatials unleas you now what you are doing
db.createUser(
{
user: "testUser1", ## CHANGE THIS
pwd: "1234", ## CHANGE THIS
roles: [
{
role: "readWrite",
db: "anomoly"
}
]
}
)Run the following command to install the Anomaly Server
sudo ./build.shThis will install the Anomaly Server on your machine using docker. After the installation, you can locally access the following services:
GraphQl: http://localhost:4000/graphql
MongoDB: http://localhost:27017In addition, you should be able to access your graphQL API at your specified Domain