Skip to content
Snippets Groups Projects
Commit 62cd04b6 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix(build): fix translation build and nginx config

parents f1938666 f5b5e319
3 merge requests!68Recette,!67Dev,!43Test
......@@ -20,7 +20,7 @@ COPY /src ./src
ARG conf
# Building the Angular app /dist i18n
RUN npm run build:dev
RUN npm run build:prod
# Stage 1, based on Nginx, to have only the compiled app
FROM nginx
......
......@@ -14,9 +14,15 @@
"sourceRoot": "src",
"prefix": "app",
"i18n": {
"sourceLocale": "fr",
"sourceLocale": {
"code": "fr",
"baseHref": ""
},
"locales": {
"en": "src/locale/messages.en.xlf"
"en": {
"baseHref": "/en/",
"translation": "src/locale/messages.en.xlf"
}
}
},
"architect": {
......@@ -54,6 +60,7 @@
"with": "src/environments/environment.prod.ts"
}
],
"aot": true,
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
......
upstream api_node_js {
server service-ram:3000;
}
server {
listen 8080 default_server;
root /usr/share/nginx/html;
index index.html;
root /usr/share/nginx/html/;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ $uri/index.html @backend;
try_files $uri $uri/ /index.html;
}
location @backend {
rewrite /api/?(.*) /$1 break;
proxy_pass http://api_node_js;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
location /api {
rewrite ^/api/(.*) /$1 break;
proxy_pass http://service-ram:3000/api;
}
location /base-adresse/base-adresse-nationale/streets {
......@@ -38,6 +31,7 @@ server {
proxy_pass https://download.data.grandlyon.com/wfs/grandlyon;
}
# REALLY important for JavaScript modules (type="module") to work as expected!!!
location ~ \.js {
add_header Content-Type text/javascript;
......
<!DOCTYPE html>
<html lang="en">
<html lang="fr">
<head>
<meta charset="utf-8" />
<title>Réseau des Acteurs de la Médiation</title>
......
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