Skip to content

Commit 3e83b2e

Browse files
authored
Merge pull request #37 from LighthouseBlog/feature/pwa
Progressive Web Application
2 parents 61a9c63 + 889edaa commit 3e83b2e

40 files changed

+2755
-1267
lines changed

.angular-cli.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"outDir": "dist",
1010
"assets": [
1111
"assets",
12-
"favicon.ico"
12+
"favicon.ico",
13+
"manifest.json"
1314
],
1415
"index": "index.html",
1516
"main": "main.ts",

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ typings/
44
*.map
55
.DS_STORE
66
npm-debug.log
7-
dist/
7+
dist/
8+
9+
*.pem

.travis.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,23 @@ before_install:
1313
install:
1414
- npm install
1515
before_deploy:
16-
- npm run build
16+
- npm run predeploy
1717
deploy:
1818
provider: script
1919
skip_cleanup: true
2020
script:
2121
- scp -o "StrictHostKeyChecking no" -r $TRAVIS_BUILD_DIR/dist $USER@$HOST:/home/ubuntu
2222
on:
23-
all_branches: true
23+
branch: master
24+
tags: true
2425
after_script:
26+
- ssh -o "StrictHostKeyChecking no" $USER@$HOST "bash -s" < deploy.sh
2527
- eval "$(ssh-agent -k)"
2628
- echo "Killed SSH Agent"
2729
- rm -rf deploy_key.pem
30+
after_failure:
31+
- eval "$(ssh-agent -k)"
32+
- echo "Killed SSH Agent"
33+
- rm -rf deploy_key.pem
34+
2835

deploy.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PATH="/home/ubuntu/.nvm/versions/node/v8.6.0/bin:$PATH"
2+
forever restartall

nginx.conf

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
user www-data;
2+
worker_processes auto;
3+
pid /run/nginx.pid;
4+
5+
events {
6+
worker_connections 768;
7+
# multi_accept on;
8+
}
9+
10+
http {
11+
12+
##
13+
# Basic Settings
14+
##
15+
16+
include /etc/nginx/sites-available/blog.sampastoriza.com;
17+
18+
sendfile on;
19+
tcp_nopush on;
20+
tcp_nodelay on;
21+
keepalive_timeout 65;
22+
types_hash_max_size 2048;
23+
# server_tokens off;
24+
25+
# server_names_hash_bucket_size 64;
26+
# server_name_in_redirect off;
27+
28+
include /etc/nginx/mime.types;
29+
default_type application/octet-stream;
30+
31+
##
32+
# SSL Settings
33+
##
34+
35+
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
36+
ssl_prefer_server_ciphers on;
37+
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
38+
39+
##
40+
# Logging Settings
41+
##
42+
43+
access_log /var/log/nginx/access.log;
44+
error_log /var/log/nginx/error.log;
45+
46+
##
47+
# Gzip Settings
48+
##
49+
50+
gzip on;
51+
gzip_disable "msie6";
52+
53+
gzip_vary on;
54+
# gzip_proxied any;
55+
gzip_comp_level 6;
56+
# gzip_buffers 16 8k;
57+
# gzip_http_version 1.1;
58+
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
59+
60+
##
61+
# Virtual Host Configs
62+
##
63+
64+
include /etc/nginx/conf.d/*.conf;
65+
include /etc/nginx/sites-enabled/*;
66+
}
67+
68+
69+
#mail {
70+
# # See sample authentication script at:
71+
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
72+
#
73+
# # auth_http localhost/auth.php;
74+
# # pop3_capabilities "TOP" "USER";
75+
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
76+
#
77+
# server {
78+
# listen localhost:110;
79+
# protocol pop3;
80+
# proxy on;
81+
# }
82+
#
83+
# server {
84+
# listen localhost:143;
85+
# protocol imap;
86+
# proxy on;
87+
# }
88+
#}

0 commit comments

Comments
 (0)