adjust docker network for docker compose

This commit is contained in:
array-in-a-matrix 2024-08-02 21:49:54 -04:00
parent 423ba71e78
commit 6ca0c224ce
4 changed files with 10 additions and 10 deletions

View file

@ -38,7 +38,7 @@ To compile the binary only, run the following (executable will be found in `/bin
docker buildx build -t glimpse-server:latest --output=bin --target=runner -f bin.dockerfile .
```
To deploy an instance of glimpse within docker, run:
To deploy an instance of glimpse within docker, run the following (make sure to update the database's host accordingly):
```sh
docker buildx build -t glimpse-server:latest .

View file

@ -1,8 +1,8 @@
services:
glimpse:
# build: .
image: glimpse-server:latest
api:
build: .
# image: glimpse-server:latest
restart: always
ports:
- "8080:8080"
@ -14,8 +14,8 @@ services:
image: postgres:latest
restart: always
user: postgres
# ports:
# - 5432:5432
ports:
- 5432:5432
volumes:
- psql-data:/var/lib/postgresql/data
environment:
@ -27,4 +27,4 @@ services:
retries: 10
volumes:
psql-data: {}
psql-data: {}

View file

@ -45,7 +45,7 @@ proc getConfig(): Cfg =
appName: config.get("Server", "appName", ""),
# database
db: config.get("Database", "db", "postgresql"),
dbHost: config.get("Database", "dbHost", "0.0.0.0"),
dbHost: config.get("Database", "dbHost", "db"),
dbUser: config.get("Database", "dbUser", "postgres"),
dbPassword: config.get("Database", "dbPassword", "postgresql"),
dbDatabase: config.get("Database", "dbDatabase", ""),

View file

@ -17,8 +17,8 @@ const defaultConf* =
[Database]
; 2 database types are supported PostgreSQL or SQLite.
#db = postgresql
; IP address of database.
#dbHost = "0.0.0.0"
; IP address or domain of the database.
#dbHost = "db"
; Database user.
#dbUser = "postgres"
; Database Password.