Deployment
This commit is contained in:
parent
85c77f7dc9
commit
c20e5fb99a
10
Makefile
10
Makefile
|
@ -5,11 +5,12 @@ CSSMIN = ./node_modules/clean-css/bin/cleancss
|
|||
cloc:
|
||||
cloc . --exclude-dir=node_modules,app/bower_components,app/jsx/build/.module_cache
|
||||
|
||||
dist:
|
||||
jsx:
|
||||
# Compiling JSX
|
||||
rm -rf app/jsx/build
|
||||
$(JSX) --extension jsx app/jsx app/jsx/build
|
||||
|
||||
js:
|
||||
# Compressing JS
|
||||
#
|
||||
# Get all script tags
|
||||
|
@ -31,6 +32,7 @@ dist:
|
|||
| xargs cat \
|
||||
| $(JSMIN) > build/app.js
|
||||
|
||||
css:
|
||||
# Compressing CSS
|
||||
#
|
||||
# Get all style tags
|
||||
|
@ -41,9 +43,13 @@ dist:
|
|||
# Minification
|
||||
cat app/app.html \
|
||||
| grep stylesheet \
|
||||
| grep -v fonts.googleapis.com \
|
||||
| grep -v opensans \
|
||||
| cut -d '"' -f 4 \
|
||||
| sed -e 's/^/app/' \
|
||||
| xargs cat \
|
||||
| $(CSSMIN) -o build/app.css
|
||||
|
||||
upload:
|
||||
scp -r build www@empact.io:~/empact/build
|
||||
|
||||
deploy: jsx js css upload
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
<link rel="stylesheet" href="/css/menu.css">
|
||||
<link rel="stylesheet" href="/css/charts.css">
|
||||
<link rel="stylesheet" href="/css/opensans.css">
|
||||
<!-- <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400,600"> -->
|
||||
</head>
|
||||
<body></body>
|
||||
<script src="/bower_components/react/react.js"></script>
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
upstream empact {
|
||||
server 127.0.0.1:8080 weight=10;
|
||||
server 127.0.0.1:8080;
|
||||
# Server with enabled profiling
|
||||
# server 127.0.0.1:8080 weight=10;
|
||||
# server 127.0.0.1:8081 max_fails=1 fail_timeout=30s;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
root /home/www/app/static;
|
||||
root /home/www/empact/build;
|
||||
charset utf-8;
|
||||
|
||||
location ~ ^/app/ {
|
||||
|
@ -21,7 +22,7 @@ server {
|
|||
}
|
||||
|
||||
location /favicon.ico {
|
||||
alias /home/www/app/static/images/favicon.ico;
|
||||
alias /home/www/empact/build/images/favicon.ico;
|
||||
add_header Cache-Control public;
|
||||
expires 1d;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue