-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
108 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
// Dynamic configuration | ||
window.__config__ = { | ||
APP_DOMAIN: '${API_DOMAIN}', | ||
APP_TITLE: '${APP_TITLE}', | ||
LANGUAGE: '${LANGUAGE}', | ||
NAVIGATOR_LANGUAGE: '${NAVIGATOR_LANGUAGE}' | ||
REACT_APP_DOMAIN: '${REACT_APP_DOMAIN}' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env sh | ||
set -eu | ||
|
||
envsubst '${API_URL} ${APP_TITLE} ${LANGUAGE} ${NAVIGATOR_LANGUAGE} ${BASENAME}' < /etc/nginx/config.js.template > /var/www/config.js | ||
envsubst '${REACT_APP_DOMAIN}' < /etc/nginx/config.js.template > /var/www/config.js | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title> | ||
<!--# echo var="status" default="" --> <!--# echo var="status_text" default="Something goes wrong" --> | ||
| SGoV Data Management | ||
</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<!--# if expr="$status = 502" --> | ||
<meta http-equiv="refresh" content="2"> | ||
<!--# endif --> | ||
</head> | ||
<style type="text/css"> | ||
body { | ||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
color: #fff; | ||
height: 100vh; | ||
margin: 0; | ||
background: #263238 linear-gradient(5deg, #057fa5 0%, #263238 100%); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
</style> | ||
<body> | ||
<!--# if expr="$status = 502" --> | ||
<h1>We are updating our website </h1> | ||
<p>This is only for a few seconds, you will be redirected.</p> | ||
<!--# else --> | ||
<h1><!--# echo var="status" default="" --> <!--# echo var="status_text" default="Something goes wrong" --></h1> | ||
<!--# endif --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
|
||
include mime.types; | ||
default_type application/octet-stream; | ||
|
||
map $status $status_text { | ||
400 'Bad Request'; | ||
401 'Unauthorized'; | ||
403 'Forbidden'; | ||
404 'Not Found'; | ||
405 'Method Not Allowed'; | ||
406 'Not Acceptable'; | ||
413 'Payload Too Large'; | ||
414 'URI Too Long'; | ||
431 'Request Header Fields Too Large'; | ||
500 'Internal Server Error'; | ||
501 'Not Implemented'; | ||
502 'Bad Gateway'; | ||
503 'Service Unavailable'; | ||
504 'Gateway Timeout'; | ||
} | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | ||
415 416 417 418 421 422 423 424 426 428 429 431 451 500 501 502 503 | ||
504 505 506 507 508 510 511 /error.html; | ||
|
||
location = /error.html { | ||
ssi on; | ||
internal; | ||
root /usr/share/nginx/html; | ||
} | ||
|
||
location / { | ||
root /var/www; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html =404; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: "3" | ||
services: | ||
plan-manager: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: plan-manager:latest | ||
container_name: plan-manager | ||
ports: | ||
- "8080:80" | ||
environment: | ||
- REACT_APP_DOMAIN=http://localhost:8080/csat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters