Skip to content
Snippets Groups Projects
Commit 04ccf0b7 authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

Merge branch '56-technical-passer-la-config-du-nom-de-host-en-variable-d-environnement' into 'dev'

Resolve "[Technical] Passer la config du nom de host en variable d'environnement"

See merge request !398
parents 7ebc5b23 c892c88a
No related branches found
No related tags found
2 merge requests!404V3.1.0 (sans impression),!398Resolve "[Technical] Passer la config du nom de host en variable d'environnement"
# Env
TAG=<version number>
NODE_ENV=<dev or production>
APP_HOST=<localhost or host>
# Configuration
SERVICE_API_BIND_PORT=<service port>
JWT_SECRET=<the secret used to sign jwt token>
......
......@@ -30,6 +30,7 @@ services:
MC_API_KEY: ${MC_API_KEY}
MC_SERVER: ${MC_SERVER}
MC_LIST_ID: ${MC_LIST_ID}
APP_HOST: ${APP_HOST}
restart: unless-stopped
networks:
- backend
......
export const configDev = {
url: process.env.MAIL_URL,
token: process.env.MAIL_TOKEN,
host: 'resin-dev.grandlyon.com',
host: process.env.APP_HOST,
protocol: 'https',
port: '443',
from: 'noreplyinclusionnumerique@grandlyon.com',
......
export const configProd = {
url: process.env.MAIL_URL,
token: process.env.MAIL_TOKEN,
host: 'resin.grandlyon.com',
host: process.env.APP_HOST,
protocol: 'https',
port: '443',
from: 'noreplyinclusionnumerique@grandlyon.com',
......
export const configRec = {
url: process.env.MAIL_URL,
token: process.env.MAIL_TOKEN,
host: 'resin-rec.grandlyon.com',
host: process.env.APP_HOST,
protocol: 'https',
port: '443',
from: 'noreplyinclusionnumerique@grandlyon.com',
......
export const config = {
url: process.env.MAIL_URL,
token: process.env.MAIL_TOKEN,
host: 'localhost',
host: process.env.APP_HOST || 'localhost',
protocol: 'http',
port: '4200',
from: 'noreplyinclusionnumerique@grandlyon.com',
......
......@@ -33,7 +33,7 @@ describe('ConfigurationService', () => {
it('should init with dev conf', () => {
process.env.NODE_ENV = 'dev';
expect(configurationService.config.host).toBe('resin-dev.grandlyon.com');
expect(configurationService.config.from_name).toBe('[DEV] Réseau des acteurs de la médiation numérique');
});
});
......@@ -55,7 +55,7 @@ describe('ConfigurationService', () => {
it('should init with prod conf', () => {
process.env.NODE_ENV = 'production';
expect(configurationService.config.host).toBe('resin.grandlyon.com');
expect(configurationService.config.from_name).toBe('Réseau des acteurs de la médiation numérique');
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment