Skip to content
This repository has been archived by the owner on May 8, 2018. It is now read-only.

Commit

Permalink
Merge branch 'feature/shutdown'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Schmidmeister committed Jun 25, 2017
2 parents 701d2aa + a6d0198 commit db018fb
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 16 deletions.
51 changes: 51 additions & 0 deletions Frontend/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"/>
<meta name="csrf-token" content="" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inconsolata|Open+Sans:400,400i,600,700" crossorigin="anonymous" />
<link rel="stylesheet" href="/css/application.css" />
<link rel="icon" href="/favicon.ico" />
<title>418 &middot; timetab.io</title>
</head>
<body>
<!--googleoff: all-->
<noscript>
<div class="page-banner">
For full functionality it is necessary to enable JavaScript.
</div>
</noscript>
<div class="page-banner" id="outdated-browser" hidden>
You are using an outdated browser. For full functionality update to a newer browser.
</div>
<!--googleon: all-->
<main>
<div>
<div class="error-header">
<img src="/images/paper-logo.svg" alt="timetab.io" />
</div>

<div class="error-content">
<h1 class="title">"418"</h1>
<p class="description">I'm a teapot.</p>
</div>
</div>
</main>

<footer class="page-footer">
<nav class="nav"></nav>

<div class="logo">
&copy; 2017 timetab.io
</div>

<div class="copyright"></div>

</footer>

<script src="/js/browser.js" async></script>
<script src="/js/polyfills.js" defer></script>
<script src="/js/application.js" defer></script>
</body>
</html>
10 changes: 3 additions & 7 deletions containers/ttio-dev-proxy/nginx/conf.d/dev.timetab.io.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ server {
add_header content-security-policy "script-src 'self' 'sha256-llPy+U8EGowJjHLQDbvAtCunazzhT1CDW0RRVEI4BgY=' https://www.google-analytics.com/analytics.js; style-src 'self' https://fonts.googleapis.com; img-src 'self' https://www.google-analytics.com; font-src 'self' https://fonts.gstatic.com; connect-src 'self' https://ttio-dev.s3.amazonaws.com; frame-ancestors 'none'; form-action 'self'; block-all-mixed-content; disown-opener; reflected-xss block; referrer no-referrer-when-downgrade;";
add_header referrer-policy strict-origin-when-cross-origin;

error_page 404 /index.html;

location / {
try_files $uri @backend;
try_files $uri =404;
access_log off;
}

location @backend {
fastcgi_pass ttio-dev-frontend:9000;
fastcgi_param SCRIPT_FILENAME /data/code/Frontend/index.php;
include fastcgi_params;
}
}
9 changes: 9 additions & 0 deletions containers/ttio-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM docker.ttio.cloud:5000/library/nginx

ARG VERSION
ENV TEMPLATE_FILE /var/www/html/index.html

COPY containers/ttio-proxy/config/nginx/conf.d/* /etc/nginx/conf.d/
COPY containers/ttio-proxy/config/nginx/* /etc/nginx/

COPY Frontend/public/images /var/www/html/images
COPY Frontend/public/favicon.ico /var/www/html/favicon.ico
COPY Frontend/public/robots.txt /var/www/html/robots.txt
COPY Frontend/public/index.html ${TEMPLATE_FILE}
COPY Frontend/scripts/add-versions.sh /bin/add-versions

COPY Styles/css/application.css /var/www/html/css/application-${VERSION}.css
COPY Styles/icons /var/www/html/icons
Expand All @@ -16,6 +19,12 @@ COPY Application/build/application.js /var/www/html/js/application-${VERSION}.js
COPY Application/build/polyfills.js /var/www/html/js/polyfills-${VERSION}.js
COPY Application/build/browser.js /var/www/html/js/browser-${VERSION}.js

RUN apk add --no-cache bash
RUN chmod +x /bin/add-versions
RUN mv ${TEMPLATE_FILE} ${TEMPLATE_FILE}.source && \
cat ${TEMPLATE_FILE}.source | add-versions > ${TEMPLATE_FILE} && \
rm ${TEMPLATE_FILE}.source

VOLUME /data/ssl
VOLUME /data/certs
VOLUME /var/www/letsencrypt
12 changes: 3 additions & 9 deletions containers/ttio-proxy/config/nginx/conf.d/timetab.io.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@ server {

add_header content-security-policy "script-src 'self' 'sha256-llPy+U8EGowJjHLQDbvAtCunazzhT1CDW0RRVEI4BgY=' https://www.google-analytics.com/analytics.js; style-src 'self' https://fonts.googleapis.com; img-src 'self' https://www.google-analytics.com; font-src 'self' https://fonts.gstatic.com; connect-src 'self' https://ttio.s3.amazonaws.com; frame-ancestors 'none'; form-action 'self'; block-all-mixed-content; disown-opener; reflected-xss block; referrer no-referrer-when-downgrade;";

error_page 404 /index.html;

location / {
try_files $uri @backend;
add_header cache-control "public, max-age=2592000";
try_files $uri =404;
access_log off;
}

location @backend {
access_log /var/log/nginx/access.log;
fastcgi_pass ttio-frontend:9000;
fastcgi_param SCRIPT_FILENAME /data/code/Frontend/index.php;
include fastcgi_params;
}
}


0 comments on commit db018fb

Please sign in to comment.