Compare commits

..

5 Commits

Author SHA1 Message Date
standardci
51c8b20506 chore(release): publish new version
- @standardnotes/api-gateway@1.63.1
 - @standardnotes/home-server@1.8.3
 - @standardnotes/revisions-server@1.21.2
2023-06-02 11:26:26 +00:00
Karol Sójko
1e62a3760e fix(home-server): displaying the port on which it is running 2023-06-02 13:08:23 +02:00
Karol Sójko
2f569d4104 fix(home-server): add default for VERSION environment variable 2023-06-02 12:52:51 +02:00
standardci
f23e444ed0 chore(release): publish new version
- @standardnotes/home-server@1.8.2
2023-06-02 10:43:32 +00:00
Karol Sójko
e6e9a32f03 fix(home-server): default configuration variables 2023-06-02 12:29:24 +02:00
10 changed files with 49 additions and 23 deletions

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.63.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.63.0...@standardnotes/api-gateway@1.63.1) (2023-06-02)
### Bug Fixes
* **home-server:** add default for VERSION environment variable ([2f569d4](https://github.com/standardnotes/api-gateway/commit/2f569d41047a802eb72ef1a3618ffe4df28a709c))
# [1.63.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.62.4...@standardnotes/api-gateway@1.63.0) (2023-06-02)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.63.0",
"version": "1.63.1",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -83,7 +83,7 @@ export class ContainerConfigLoader {
container
.bind(TYPES.HTTP_CALL_TIMEOUT)
.toConstantValue(env.get('HTTP_CALL_TIMEOUT', true) ? +env.get('HTTP_CALL_TIMEOUT', true) : 60_000)
container.bind(TYPES.VERSION).toConstantValue(env.get('VERSION'))
container.bind(TYPES.VERSION).toConstantValue(env.get('VERSION', true) ?? 'development')
container.bind(TYPES.CROSS_SERVICE_TOKEN_CACHE_TTL).toConstantValue(+env.get('CROSS_SERVICE_TOKEN_CACHE_TTL', true))
// Middleware

View File

@@ -1,15 +1,5 @@
LOG_LEVEL=debug
NODE_ENV=development
VERSION=development
# (Optional) New Relic Setup
NEW_RELIC_ENABLED=false
NEW_RELIC_APP_NAME="Home Server"
CACHE_TYPE=memory
DB_TYPE=sqlite
DB_DATABASE=home_server
JWT_SECRET=
AUTH_JWT_SECRET=

View File

@@ -3,6 +3,19 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.8.3](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.8.2...@standardnotes/home-server@1.8.3) (2023-06-02)
### Bug Fixes
* **home-server:** add default for VERSION environment variable ([2f569d4](https://github.com/standardnotes/server/commit/2f569d41047a802eb72ef1a3618ffe4df28a709c))
* **home-server:** displaying the port on which it is running ([1e62a37](https://github.com/standardnotes/server/commit/1e62a3760e3b9601478c851cf33db2f2b348d7fb))
## [1.8.2](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.8.1...@standardnotes/home-server@1.8.2) (2023-06-02)
### Bug Fixes
* **home-server:** default configuration variables ([e6e9a32](https://github.com/standardnotes/server/commit/e6e9a32f0385789e5e772e5cabcc0da0b8ccbb01))
## [1.8.1](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.8.0...@standardnotes/home-server@1.8.1) (2023-06-02)
**Note:** Version bump only for package @standardnotes/home-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/home-server",
"version": "1.8.1",
"version": "1.8.3",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -30,7 +30,16 @@ export class HomeServer implements HomeServerInterface {
const serviceContainer = new ServiceContainer()
const directCallDomainEventPublisher = new DirectCallDomainEventPublisher()
const env: Env = new Env(configuration?.environment)
const environmentOverrides = {
...configuration?.environment,
NEW_RELIC_ENABLED: 'false',
NEW_RELIC_APP_NAME: 'Home Server',
CACHE_TYPE: 'memory',
DB_TYPE: 'sqlite',
DB_DATABASE: 'home_server',
}
const env: Env = new Env(environmentOverrides)
env.load()
this.configureLoggers(env)
@@ -44,23 +53,23 @@ export class HomeServer implements HomeServerInterface {
const container = Container.merge(
(await apiGatewayService.getContainer({
logger: winston.loggers.get('api-gateway'),
environmentOverrides: configuration?.environment,
environmentOverrides,
})) as Container,
(await authService.getContainer({
logger: winston.loggers.get('auth-server'),
environmentOverrides: configuration?.environment,
environmentOverrides,
})) as Container,
(await syncingService.getContainer({
logger: winston.loggers.get('syncing-server'),
environmentOverrides: configuration?.environment,
environmentOverrides,
})) as Container,
(await revisionsService.getContainer({
logger: winston.loggers.get('revisions-server'),
environmentOverrides: configuration?.environment,
environmentOverrides,
})) as Container,
(await filesService.getContainer({
logger: winston.loggers.get('files-server'),
environmentOverrides: configuration?.environment,
environmentOverrides,
})) as Container,
)
@@ -119,9 +128,11 @@ export class HomeServer implements HomeServerInterface {
})
})
this.serverInstance = server.build().listen(env.get('PORT', true) ? +env.get('PORT', true) : 3000)
const port = env.get('PORT', true) ? +env.get('PORT', true) : 3000
logger.info(`Server started on port ${process.env.PORT}`)
this.serverInstance = server.build().listen(port)
logger.info(`Server started on port ${port}`)
}
async stop(): Promise<void> {

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.21.2](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.21.1...@standardnotes/revisions-server@1.21.2) (2023-06-02)
### Bug Fixes
* **home-server:** add default for VERSION environment variable ([2f569d4](https://github.com/standardnotes/server/commit/2f569d41047a802eb72ef1a3618ffe4df28a709c))
## [1.21.1](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.21.0...@standardnotes/revisions-server@1.21.1) (2023-06-02)
### Bug Fixes

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/revisions-server",
"version": "1.21.1",
"version": "1.21.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -95,7 +95,7 @@ export class ContainerConfigLoader {
}
container.bind(TYPES.Revisions_NEW_RELIC_ENABLED).toConstantValue(env.get('NEW_RELIC_ENABLED', true))
container.bind(TYPES.Revisions_VERSION).toConstantValue(env.get('VERSION'))
container.bind(TYPES.Revisions_VERSION).toConstantValue(env.get('VERSION', true) ?? 'development')
// Map
container