-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WE-642 start refactoring documentation while verifying validity
- Loading branch information
Showing
5 changed files
with
86 additions
and
5 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,30 @@ | ||
# MongoDB | ||
|
||
## Setup locally | ||
|
||
To create and setup mongodb locally, you can use the included `docker-compose.yml` after customising it. | ||
|
||
```yml | ||
version: '3.1' | ||
|
||
services: | ||
mongo: | ||
image: mongo:4.4.1 | ||
container_name: witsml-explorer-db | ||
restart: unless-stopped | ||
ports: | ||
- 27017:27017 | ||
volumes: | ||
- ./data:/data/db #Location for data folder can be changed. | ||
environment: | ||
- MONGO_INITDB_ROOT_USERNAME=<insert username> | ||
- MONGO_INITDB_ROOT_PASSWORD=<insert password> | ||
``` | ||
Change the username and password and where to put your data (now `./data` folder in current directory) | ||
The data folder will be created when you run `docker compose up` for the first time | ||
|
||
```sh | ||
``` |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
|
||
echo "Building witsmlexplorer-api..." | ||
docker build -t docker.pkg.github.com/equinor/witsml-explorer/witsmlexplorer-api -f Dockerfile-api . | ||
docker build -t witsmlexplorer-api:latest -f Dockerfile-api . | ||
|
||
echo "Building witsmlexplorer-frontend..." | ||
docker build -t docker.pkg.github.com/equinor/witsml-explorer/witsmlexplorer-frontend -f Dockerfile-frontend . | ||
docker build -t witsmlexplorer-frontend:latest -f Dockerfile-frontend . |
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,51 @@ | ||
# Deploy and run Witsml-Explorer | ||
|
||
## MongoDB | ||
See []() | ||
|
||
## Azure CosmosDB | ||
See []() | ||
|
||
## Run locally with docker | ||
|
||
Build dockerfiles for frontend and backend (see `build_docker_images.sh`, `Dockerfile-api` and `Dockerfile-frontend`) | ||
|
||
**Build api and backend images** | ||
```sh | ||
❯ docker build -t witsmlexplorer-api:latest -f Dockerfile-api . | ||
Building witsmlexplorer-api... | ||
[+] Building 114.0s (24/24) FINISHED | ||
❯ docker build -t witsmlexplorer-frontend:latest -f Dockerfile-frontend . | ||
Building witsmlexplorer-frontend... | ||
[+] Building 136.7s (21/21) FINISHED | ||
|
||
❯ docker images | ||
REPOSITORY TAG IMAGE ID CREATED SIZE | ||
witsmlexplorer-frontend latest 080fabac5c62 53 seconds ago 24.1MB | ||
witsmlexplorer-api latest 2f1eb2b076d1 3 minutes ago 271MB | ||
|
||
``` | ||
|
||
create a `config.json` file containing the mongodb or cososdb credentials you have created. | ||
|
||
**mongodb** | ||
```json | ||
} | ||
"MongoDb": { | ||
"Name": "witsml-explorer-db", | ||
"ConnectionString": "mongodb://user:password@localhost" | ||
} | ||
} | ||
``` | ||
|
||
**cosmosdb** | ||
```json | ||
{ | ||
"Db": { | ||
"Uri": "<...>", (Uri from relevant Azure Database => Overview => Uri ) | ||
"Name": "<...>", (Container name from relevant Azure Database => DataExplorer || databaseName from config.cfg) | ||
"AuthKey": "<...>" (PrimaryKey from relevant Azure Database => Setting => Keys ) | ||
} | ||
"Host": "http[s]://<domain-where-witsml-explorer-is-hosted>" | ||
} | ||
``` |