mirror of
https://github.com/glimpse-app/server.git
synced 2025-04-02 10:52:45 -04:00
add docker compose instructions
This commit is contained in:
parent
6ca0c224ce
commit
754a1f5b4d
1 changed files with 19 additions and 1 deletions
20
README.md
20
README.md
|
@ -32,12 +32,16 @@ nimble test
|
|||
|
||||
### Docker
|
||||
|
||||
#### Compile binary
|
||||
|
||||
To compile the binary only, run the following (executable will be found in `/bin/`):
|
||||
|
||||
```sh
|
||||
docker buildx build -t glimpse-server:latest --output=bin --target=runner -f bin.dockerfile .
|
||||
```
|
||||
|
||||
#### Deploy using docker run
|
||||
|
||||
To deploy an instance of glimpse within docker, run the following (make sure to update the database's host accordingly):
|
||||
|
||||
```sh
|
||||
|
@ -51,11 +55,25 @@ Use the following to run a temporary PostgreSQL database, (**DO NOT USE IN PRODU
|
|||
docker run -it --rm -e POSTGRES_USER=user -e POSTGRES_PASSWORD=postgresql -p 5432:5432 postgres
|
||||
```
|
||||
|
||||
#### Deploy using docker compose
|
||||
|
||||
The docker compose provided sets up a postgres server alongside glimpse. To deploy, run (add the `-d` to detach and run in the background):
|
||||
|
||||
```sh
|
||||
docker compose up
|
||||
```
|
||||
|
||||
To shutdown the servers:
|
||||
|
||||
```sh
|
||||
docker compose down
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Configuration
|
||||
|
||||
Glimpse will create the default configuration file, `config.ini`, in the root of the directory if it does not exist. Configuration relating to web framework, [Jester](https://github.com/dom96/jester), is under the `Server` section. Database configuration is under the `Database` section. Other configuration variables are under `General`.
|
||||
Glimpse will create the default configuration file, `config.ini`, in the root of the directory if it does not exist. Configuration relating to web framework, [Jester](https://github.com/dom96/jester), is under the `Server` section. Database configuration is under the `Database` section. Other configuration variables are under `General`. If running glimpse using the docker image, `docker run ...`, make sure to adjust container's network pointing it to the database (Use `network_mode: host` if database is running from host).
|
||||
|
||||
### API Endpoints
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue