Browse Source
Merge branch 'main' into feature/add-data-source-eod-historical-data
pull/974/head
Thomas Kaul
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with
15 additions and
4 deletions
-
.env
-
CHANGELOG.md
-
apps/api/src/app/app.module.ts
-
apps/api/src/app/redis-cache/redis-cache.module.ts
-
apps/api/src/services/configuration.service.ts
-
apps/api/src/services/interfaces/environment.interface.ts
-
docker/docker-compose.build.yml
-
docker/docker-compose.yml
|
@ -3,14 +3,15 @@ COMPOSE_PROJECT_NAME=ghostfolio-development |
|
|
# CACHE |
|
|
# CACHE |
|
|
REDIS_HOST=localhost |
|
|
REDIS_HOST=localhost |
|
|
REDIS_PORT=6379 |
|
|
REDIS_PORT=6379 |
|
|
|
|
|
REDIS_PASSWORD=<INSERT_REDIS_PASSWORD> |
|
|
|
|
|
|
|
|
# POSTGRES |
|
|
# POSTGRES |
|
|
POSTGRES_DB=ghostfolio-db |
|
|
POSTGRES_DB=ghostfolio-db |
|
|
POSTGRES_USER=user |
|
|
POSTGRES_USER=user |
|
|
POSTGRES_PASSWORD=password |
|
|
POSTGRES_PASSWORD=<INSERT_POSTGRES_PASSWORD> |
|
|
|
|
|
|
|
|
ACCESS_TOKEN_SALT=GHOSTFOLIO |
|
|
ACCESS_TOKEN_SALT=<INSERT_RANDOM_STRING> |
|
|
ALPHA_VANTAGE_API_KEY= |
|
|
ALPHA_VANTAGE_API_KEY= |
|
|
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?sslmode=prefer |
|
|
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?sslmode=prefer |
|
|
JWT_SECRET_KEY=123456 |
|
|
JWT_SECRET_KEY=<INSERT_RANDOM_STRING> |
|
|
PORT=3333 |
|
|
PORT=3333 |
|
|
|
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
|
- Added `EOD_HISTORICAL_DATA` as a new data source type |
|
|
- Added `EOD_HISTORICAL_DATA` as a new data source type |
|
|
|
|
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
|
|
|
|
- Exposed the environment variable `REDIS_PASSWORD` |
|
|
|
|
|
|
|
|
### Todo |
|
|
### Todo |
|
|
|
|
|
|
|
|
- Apply data migration (`yarn database:migrate`) |
|
|
- Apply data migration (`yarn database:migrate`) |
|
|
|
@ -42,7 +42,8 @@ import { UserModule } from './user/user.module'; |
|
|
BullModule.forRoot({ |
|
|
BullModule.forRoot({ |
|
|
redis: { |
|
|
redis: { |
|
|
host: process.env.REDIS_HOST, |
|
|
host: process.env.REDIS_HOST, |
|
|
port: parseInt(process.env.REDIS_PORT, 10) |
|
|
port: parseInt(process.env.REDIS_PORT, 10), |
|
|
|
|
|
password: process.env.REDIS_PASSWORD |
|
|
} |
|
|
} |
|
|
}), |
|
|
}), |
|
|
CacheModule, |
|
|
CacheModule, |
|
|
|
@ -14,6 +14,7 @@ import { RedisCacheService } from './redis-cache.service'; |
|
|
useFactory: async (configurationService: ConfigurationService) => ({ |
|
|
useFactory: async (configurationService: ConfigurationService) => ({ |
|
|
host: configurationService.get('REDIS_HOST'), |
|
|
host: configurationService.get('REDIS_HOST'), |
|
|
max: configurationService.get('MAX_ITEM_IN_CACHE'), |
|
|
max: configurationService.get('MAX_ITEM_IN_CACHE'), |
|
|
|
|
|
password: configurationService.get('REDIS_PASSWORD'), |
|
|
port: configurationService.get('REDIS_PORT'), |
|
|
port: configurationService.get('REDIS_PORT'), |
|
|
store: redisStore, |
|
|
store: redisStore, |
|
|
ttl: configurationService.get('CACHE_TTL') |
|
|
ttl: configurationService.get('CACHE_TTL') |
|
|
|
@ -37,6 +37,7 @@ export class ConfigurationService { |
|
|
PORT: port({ default: 3333 }), |
|
|
PORT: port({ default: 3333 }), |
|
|
RAKUTEN_RAPID_API_KEY: str({ default: '' }), |
|
|
RAKUTEN_RAPID_API_KEY: str({ default: '' }), |
|
|
REDIS_HOST: str({ default: 'localhost' }), |
|
|
REDIS_HOST: str({ default: 'localhost' }), |
|
|
|
|
|
REDIS_PASSWORD: str({ default: '' }), |
|
|
REDIS_PORT: port({ default: 6379 }), |
|
|
REDIS_PORT: port({ default: 6379 }), |
|
|
ROOT_URL: str({ default: 'http://localhost:4200' }), |
|
|
ROOT_URL: str({ default: 'http://localhost:4200' }), |
|
|
STRIPE_PUBLIC_KEY: str({ default: '' }), |
|
|
STRIPE_PUBLIC_KEY: str({ default: '' }), |
|
|
|
@ -28,6 +28,7 @@ export interface Environment extends CleanedEnvAccessors { |
|
|
PORT: number; |
|
|
PORT: number; |
|
|
RAKUTEN_RAPID_API_KEY: string; |
|
|
RAKUTEN_RAPID_API_KEY: string; |
|
|
REDIS_HOST: string; |
|
|
REDIS_HOST: string; |
|
|
|
|
|
REDIS_PASSWORD: string; |
|
|
REDIS_PORT: number; |
|
|
REDIS_PORT: number; |
|
|
ROOT_URL: string; |
|
|
ROOT_URL: string; |
|
|
STRIPE_PUBLIC_KEY: string; |
|
|
STRIPE_PUBLIC_KEY: string; |
|
|
|
@ -7,6 +7,7 @@ services: |
|
|
environment: |
|
|
environment: |
|
|
DATABASE_URL: postgresql://user:password@postgres:5432/ghostfolio-db?sslmode=prefer |
|
|
DATABASE_URL: postgresql://user:password@postgres:5432/ghostfolio-db?sslmode=prefer |
|
|
REDIS_HOST: 'redis' |
|
|
REDIS_HOST: 'redis' |
|
|
|
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD} |
|
|
ports: |
|
|
ports: |
|
|
- 3333:3333 |
|
|
- 3333:3333 |
|
|
|
|
|
|
|
|
|
@ -7,6 +7,7 @@ services: |
|
|
environment: |
|
|
environment: |
|
|
DATABASE_URL: postgresql://user:password@postgres:5432/ghostfolio-db?sslmode=prefer |
|
|
DATABASE_URL: postgresql://user:password@postgres:5432/ghostfolio-db?sslmode=prefer |
|
|
REDIS_HOST: 'redis' |
|
|
REDIS_HOST: 'redis' |
|
|
|
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD} |
|
|
ports: |
|
|
ports: |
|
|
- 3333:3333 |
|
|
- 3333:3333 |
|
|
|
|
|
|
|
|