Skip to content
Snippets Groups Projects
Commit 97910451 authored by Andrew Kapuscinski's avatar Andrew Kapuscinski
Browse files

Update ui nginx ws dev

parent ca833595
No related branches found
Tags end-of-sprint-46
1 merge request!130Update ui nginx ws dev
Pipeline #965 passed
......@@ -17,7 +17,7 @@ COPY ./apps/web ./
# TODO: Run e2e tests here
# Build the angular app
RUN ./node_modules/.bin/ng build --configuration=test --output-path=dist
RUN ./node_modules/.bin/ng build --configuration=dev --output-path=dist
# Use nginx base image
FROM nginx:1.19.7-alpine
......
......@@ -83,6 +83,30 @@
"maximumError": "5mb"
}
]
},
"dev": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.dev.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
......
......@@ -23,7 +23,6 @@ export class CapabilityLauncherService {
parameters: any
): Observable<CapabilityRequest> {
const url =
environment.workspacesUrl +
this.endpoint +
capabilityName +
'/request/create';
......@@ -38,7 +37,7 @@ export class CapabilityLauncherService {
capabilityName: string,
requestId: string
): Observable<CapabilityExecution> {
const url = `${environment.workspacesUrl}${this.endpoint}${capabilityName}/request/${requestId}/submit`;
const url = `${this.endpoint}${capabilityName}/request/${requestId}/submit`;
return this.httpClient.post<CapabilityExecution>(url, null);
}
}
export const environment = {
production: true,
// archive search services
apiUrl: 'https://webtest.aoc.nrao.edu/archiveServices/',
// workspace services
workspacesUrl: 'https://ws-dev.nrao.edu/'
};
# Workspaces NGINX config
server {
listen 80;
server_name shipman.aoc.nrao.edu;
listen 80;
root /usr/share/nginx/html;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location ^/capability/(.*) {
proxy_redirect off;
proxy_pass http://shipman.aoc.nrao.edu:3457;
proxy_set_header Origin http://shipman.aoc.nrao.edu:4444;
proxy_hide_header Access-Control-Allow-Origin;
add_header Access-Control-Allow-Origin *;
location /capability {
proxy_pass http://capability:3457;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 500 502 503 504 /50x.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
root /usr/share/nginx/html;
}
}
\ No newline at end of file
server {
listen 80;
location / {
proxy_pass http://frontend:4200;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}
location /capability {
proxy_pass http://capability:3457;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
\ No newline at end of file
version: '3.8'
services:
nginx:
image: nginx:1.19.7-alpine
restart: always
ports:
- "4444:80"
command: nginx -g "daemon off;"
volumes:
- ./apps/web/ws-nginx.local.conf:/etc/nginx/conf.d/default.conf
db:
image: marconi.aoc.nrao.edu/ops/ci/db:workspaces
restart: always
......
......@@ -4,4 +4,5 @@ FROM marconi.aoc.nrao.edu/ops/base:workspaces
WORKDIR /code/schema
ENTRYPOINT ["./bin/run-migrations.sh", "docker"]
CMD ["./bin/run-migrations.sh", "docker"]
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