Store PostgreSQL and Redis data in Docker volumes.
This should solve permission issues that can occur in some cases (e.g. on Windows PostgreSQL can complain about an ownership mismatch of the /var/lib/postgresql/data directory).
This commit is contained in:
parent
2ad6a3e571
commit
b9178714cc
@ -15,8 +15,6 @@ but keep in mind that for production usage it might need modifications.
|
||||
* https://www.loraserver.io/lora-app-server/install/config/
|
||||
* https://www.loraserver.io/lora-geo-server/install/config/
|
||||
* `configuration/postgresql/initdb/`: directory containing PostgreSQL initialization scripts
|
||||
* `data/postgresql`: directory containing the PostgreSQL data (auto-created)
|
||||
* `data/redis`: directory containing the Redis data (auto-created)
|
||||
|
||||
## Configuration
|
||||
|
||||
@ -25,6 +23,11 @@ The LoRa Server components are pre-configured to work with the provided
|
||||
to the `configuration/loraserver/loraserver.toml` configuration file to
|
||||
configure a different band.
|
||||
|
||||
# Data persistence
|
||||
|
||||
PostgreSQL and Redis data is persisted in Docker volumes, see the `docker-compose.yml`
|
||||
`volumes` definition.
|
||||
|
||||
## Requirements
|
||||
|
||||
Before using this `docker-compose.yml` file, make sure you have [Docker](https://www.docker.com/community-edition)
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: "2"
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
loraserver:
|
||||
@ -29,14 +29,19 @@ services:
|
||||
image: postgres:9.6-alpine
|
||||
volumes:
|
||||
- ./configuration/postgresql/initdb:/docker-entrypoint-initdb.d
|
||||
- ./data/postgresql:/var/lib/postgresql/data
|
||||
- postgresqldata:/var/lib/postgresql/data
|
||||
|
||||
redis:
|
||||
image: redis:4-alpine
|
||||
volumes:
|
||||
- ./data/redis:/data
|
||||
- redisdata:/data
|
||||
|
||||
mosquitto:
|
||||
image: eclipse-mosquitto
|
||||
ports:
|
||||
- 1883:1883
|
||||
|
||||
volumes:
|
||||
postgresqldata:
|
||||
redisdata:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user