mirror of
https://github.com/dedicatedcode/reitti.git
synced 2026-01-09 17:37:57 -05:00
add REDIS configuration for docker (#63)
This commit is contained in:
39
README.md
39
README.md
@@ -142,6 +142,10 @@ docker run -p 8080:8080 \
|
||||
-e RABBITMQ_PORT=5672 \
|
||||
-e RABBITMQ_USER=reitti \
|
||||
-e RABBITMQ_PASSWORD=reitti \
|
||||
-e REDIS_HOST=redis \
|
||||
-e REDIS_PORT=6379 \
|
||||
-e REDIS_USERNAME= \
|
||||
-e REDIS_PASSWORD=
|
||||
dedicatedcode/reitti:latest
|
||||
```
|
||||
|
||||
@@ -150,27 +154,32 @@ docker run -p 8080:8080 \
|
||||
The included `docker-compose.yml` provides a complete setup with:
|
||||
- PostgreSQL with PostGIS extensions
|
||||
- RabbitMQ for message processing
|
||||
- Redis for caching and session storage
|
||||
- Reitti application with proper networking
|
||||
- Persistent data volumes
|
||||
- Health checks and restart policies
|
||||
|
||||
### Environment Variables
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `POSTGIS_HOST` | PostgreSQL database host | postgis |
|
||||
| `POSTGIS_PORT` | PostgreSQL database port | 5432 |
|
||||
| `POSTGIS_DB` | PostgreSQL database name | reittidb |
|
||||
| `POSTGIS_USER` | Database username | reitti |
|
||||
| `POSTGIS_PASSWORD` | Database password | reitti |
|
||||
| `RABBITMQ_HOST` | RabbitMQ host | rabbitmq |
|
||||
| `RABBITMQ_PORT` | RabbitMQ port | 5672 |
|
||||
| `RABBITMQ_USER` | RabbitMQ username | reitti |
|
||||
| `RABBITMQ_PASSWORD` | RabbitMQ password | reitti |
|
||||
| `SERVER_PORT` | Application server port | 8080 |
|
||||
| `APP_UID` | User ID to run the application as | 1000 |
|
||||
| `APP_GID` | Group ID to run the application as | 1000 |
|
||||
| `JAVA_OPTS` | JVM options | |
|
||||
| Variable | Description | Default |
|
||||
|---------------------|------------------------------------|----------|
|
||||
| `POSTGIS_HOST` | PostgreSQL database host | postgis |
|
||||
| `POSTGIS_PORT` | PostgreSQL database port | 5432 |
|
||||
| `POSTGIS_DB` | PostgreSQL database name | reittidb |
|
||||
| `POSTGIS_USER` | Database username | reitti |
|
||||
| `POSTGIS_PASSWORD` | Database password | reitti |
|
||||
| `RABBITMQ_HOST` | RabbitMQ host | rabbitmq |
|
||||
| `RABBITMQ_PORT` | RabbitMQ port | 5672 |
|
||||
| `RABBITMQ_USER` | RabbitMQ username | reitti |
|
||||
| `RABBITMQ_PASSWORD` | RabbitMQ password | reitti |
|
||||
| `REDIS_HOST` | Redis host | redis |
|
||||
| `REDIS_PORT` | Redis port | 6379 |
|
||||
| `REDIS_USERNAME` | Redis username (optional) | |
|
||||
| `REDIS_PASSWORD` | Redis password (optional) | |
|
||||
| `SERVER_PORT` | Application server port | 8080 |
|
||||
| `APP_UID` | User ID to run the application as | 1000 |
|
||||
| `APP_GID` | Group ID to run the application as | 1000 |
|
||||
| `JAVA_OPTS` | JVM options | |
|
||||
|
||||
### Tags
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ services:
|
||||
restart: true
|
||||
redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PORT=6379
|
||||
- REDIS_PASSWORD=
|
||||
- REDIS_DATABASE=0
|
||||
postgis:
|
||||
image: postgis/postgis:17-3.5-alpine
|
||||
environment:
|
||||
|
||||
@@ -11,5 +11,9 @@ spring.rabbitmq.port=${RABBITMQ_PORT:5672}
|
||||
spring.rabbitmq.username=${RABBITMQ_USER:reitti}
|
||||
spring.rabbitmq.password=${RABBITMQ_PASSWORD:reitti}
|
||||
|
||||
spring.data.redis.host=${REDIS_HOST:redis}
|
||||
spring.data.redis.port=${REDIS_PORT:6397}
|
||||
spring.data.redis.username=${REDIS_USERNAME:}
|
||||
spring.data.redis.password=${REDIS_PASSWORD:}
|
||||
|
||||
logging.level.root = INFO
|
||||
@@ -16,6 +16,12 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/reittidb
|
||||
spring.datasource.username=reitti
|
||||
spring.datasource.password=reitti
|
||||
|
||||
#Redis configuration
|
||||
spring.data.redis.host=localhost
|
||||
spring.data.redis.port=6379
|
||||
spring.data.redis.username=
|
||||
spring.data.redis.password=
|
||||
|
||||
spring.thymeleaf.cache=false
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user