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.yml
file -
The
Caddy/CaddyFile
file -
The
docker-entrypoint-initdb.d/mongo-init
file -
Inside
docker-compose.yml
fileMONGO_INITDB_ROOT_USERNAME
andMONGO_INITDB_ROOT_PASSWORD
environment 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-init
file 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.sh
This 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:27017
In addition, you should be able to access your graphQL API at your specified Domain