Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ cypress/screenshots/*

temp/
templates/
!infrastructure/**/templates

public/config.json
public/release.json
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [1.3.2] - 2023-07-11

- [#112](https://github.com/os2display/display-client/pull/112)
Re-added infrastructure template files wrongfully excluded by gitignore

## [1.3.1] - 2023-07-11

- [#111](https://github.com/os2display/display-client/pull/111)
Expand Down
19 changes: 19 additions & 0 deletions infrastructure/itkdev/etc/confd/templates/config.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"apiEndpoint": "{{ getenv "APP_API_ENDPOINT" "/" }}",
"authenticationEndpoint": "{{ getenv "APP_API_AUTHENTICATION_ENDPOINT" "/v1/authentication/token" }}",
"authenticationRefreshTokenEndpoint": "{{ getenv "APP_API_AUTHENTICATION_REFRESH_ENDPOINT" "/v1/authentication/token/refresh" }}",
"dataStrategy": {
"type": "pull",
"config": {
"interval": {{ getenv "APP_DATA_PULL_INTERVAL" "30000" }},
"endpoint": "{{ getenv "APP_API_PATH" "/" }}"
}
},
"colorScheme": {
"type": "library",
"lat": {{ getenv "APP_CLIENT_LATITUDE" "56.0" }},
"lng": {{ getenv "APP_CLIENT_LONGITUDE" "10.0" }}
},
"schedulingInterval": {{ getenv "APP_SCHEDULING_INTERVAL" "60000" }},
"debug": {{ getenv "APP_DEBUG" "false" }}
}
34 changes: 34 additions & 0 deletions infrastructure/itkdev/etc/confd/templates/default.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
server {
listen 8080;
server_name localhost;
root /var/www/html;

location {{ getenv "APP_SCREEN_CLIENT_PATH" "/" }} {
rewrite ^{{ getenv "APP_SCREEN_CLIENT_PATH" "/" }}(.*) /$1 break;
index index.html;
autoindex off;
try_files $uri $uri/ =404;
}

location = {{ getenv "APP_SCREEN_CLIENT_PATH" "" }}/robots.txt {
add_header Content-Type text/plain;
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
return 200 "User-agent: *\nDisallow: /\n";
}

error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
}

server {
listen 8081;
server_name localhost;
root /var/www/html/public;

error_log off;
access_log off;

location /stub_status {
stub_status;
}
}
45 changes: 45 additions & 0 deletions infrastructure/itkdev/etc/confd/templates/nginx.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
worker_processes auto;

error_log /var/log/nginx/error.log warn;
pid /tmp/nginx.pid;

events {
worker_connections 2048;
multi_accept on;
}

http {
open_file_cache max=10000 inactive=5m;
open_file_cache_valid 5m;
open_file_cache_min_uses 5;
open_file_cache_errors off;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15 15;
types_hash_max_size 2048;

server_tokens off;

gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.0;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

error_log /dev/stderr;
access_log /dev/stdout main;

include /etc/nginx/conf.d/*.conf;
}
19 changes: 19 additions & 0 deletions infrastructure/os2display/etc/confd/templates/config.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"apiEndpoint": "{{ getenv "APP_API_ENDPOINT" "/" }}",
"authenticationEndpoint": "{{ getenv "APP_API_AUTHENTICATION_ENDPOINT" "/v1/authentication/token" }}",
"authenticationRefreshTokenEndpoint": "{{ getenv "APP_API_AUTHENTICATION_REFRESH_ENDPOINT" "/v1/authentication/token/refresh" }}",
"dataStrategy": {
"type": "pull",
"config": {
"interval": {{ getenv "APP_DATA_PULL_INTERVAL" "30000" }},
"endpoint": "{{ getenv "APP_API_PATH" "/" }}"
}
},
"colorScheme": {
"type": "library",
"lat": {{ getenv "APP_CLIENT_LATITUDE" "56.0" }},
"lng": {{ getenv "APP_CLIENT_LONGITUDE" "10.0" }}
},
"schedulingInterval": {{ getenv "APP_SCHEDULING_INTERVAL" "60000" }},
"debug": {{ getenv "APP_DEBUG" "false" }}
}
34 changes: 34 additions & 0 deletions infrastructure/os2display/etc/confd/templates/default.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
server {
listen 8080;
server_name localhost;
root /var/www/html;

location {{ getenv "APP_SCREEN_CLIENT_PATH" "/" }} {
rewrite ^{{ getenv "APP_SCREEN_CLIENT_PATH" "/" }}(.*) /$1 break;
index index.html;
autoindex off;
try_files $uri $uri/ =404;
}

location = {{ getenv "APP_SCREEN_CLIENT_PATH" "" }}/robots.txt {
add_header Content-Type text/plain;
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
return 200 "User-agent: *\nDisallow: /\n";
}

error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
}

server {
listen 8081;
server_name localhost;
root /var/www/html/public;

error_log off;
access_log off;

location /stub_status {
stub_status;
}
}
45 changes: 45 additions & 0 deletions infrastructure/os2display/etc/confd/templates/nginx.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
worker_processes auto;

error_log /var/log/nginx/error.log warn;
pid /tmp/nginx.pid;

events {
worker_connections 2048;
multi_accept on;
}

http {
open_file_cache max=10000 inactive=5m;
open_file_cache_valid 5m;
open_file_cache_min_uses 5;
open_file_cache_errors off;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15 15;
types_hash_max_size 2048;

server_tokens off;

gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.0;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

error_log /dev/stderr;
access_log /dev/stdout main;

include /etc/nginx/conf.d/*.conf;
}