Skip to content

Commit

Permalink
adding docker compose and database connection documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
bazarijoo committed May 10, 2024
1 parent a0ccb91 commit f289453
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ First, navigate to the project directory and install the necessary packages usin
```

2. **Configure Database Properties:**
Copy the provided example configuration file to create your own configuration:
```bash
cp static/config.yaml.example conf/db_config.yaml
```
Now, edit the `db_config.yaml` file with your desired database properties and credentials. Ensure you have proper access rights and credentials for the database.
Edit the `conf/db_config.yaml` to set up your own database with your desired properties and credentials. We defined a local instance by default. If you don't user docker compose for running W4H and Postgres, replace `host_name='local'` to access the database server.

3. **Stream Simulation:**
To start the stream simulation service, run the following command:
Expand All @@ -53,11 +49,18 @@ docker has been installed in you server. run:
docker
```

to check
to check.
## Setup

Run:
```shell
docker run -dp 8501:8501 uscimsc/w4h:latest
```
Then access http://{your_server_ip}:8501/ to see the dashboard.
Then access `http://{your_server_ip}:8501/` to see the dashboard.

# Setup W4H toolkit with Docker Compose
Make sure to have docker and docker compose installed on your system. Then, run:
```
docker compose up --build
```
You should be able to access the dashboard and database server through `http://{your_server_ip}:8501`.
2 changes: 1 addition & 1 deletion conf/db_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ database_number: 1
database1:
nickname: 'local db' # will shows in the selectbox
dbms: 'postgresql'
host: 'localhost' # Replace with your DB host
host: 'db' # Replace with your DB host (replace with 'localhost' when not using docker for running W4H)
port: 5432 # Replace with your DB port
user: 'admin' # Replace with your DB username
password: 'admin'
Expand Down

0 comments on commit f289453

Please sign in to comment.