Skip to content

Commit 79ed1ca

Browse files
committed
1.7.0
1.7.0 - 2017-06-08 ------------------------------------------------ ## General * Fixes issue in `kit/lib/env.js`, where `isProduction` was always returning `false` ## Docker * Adds `Dockerfile`, for building a production web server Docker image * Adds `.dockerignore`, copied from the existing `.gitignore` to avoid unnecessary build context ## NPM * Removes `yarn.lock` -- the official advice is to avoid Yarn at present, due to certain third-party NPM packages relying on 'postinstall' hooks to build binaries from source * Adds `package-lock.json`, for faster builds with NPM v5 * Explicitly adds `iltorb` and `node-zopfli`, binary packages required for Brotli and Zopfli compression respectively * Adds packages: "iltorb": "^1.3.1" "node-zopfli": "^2.0.2"
1 parent 07e17fd commit 79ed1ca

7 files changed

Lines changed: 9675 additions & 8088 deletions

File tree

.dockerignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Meta
2+
**/.DS_Store
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
9+
# Runtime data
10+
pids
11+
*.pid
12+
*.seed
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# node-waf configuration
27+
.lock-wscript
28+
29+
# Compiled binary addons (http://nodejs.org/api/addons.html)
30+
build/Release
31+
32+
# Dependency directories
33+
node_modules
34+
jspm_packages
35+
36+
# Optional npm cache directory
37+
.npm
38+
39+
# Optional REPL history
40+
.node_repl_history
41+
42+
# Distribution
43+
dist

CHANGELOG

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
1.7.0 - 2017-06-08
2+
------------------------------------------------
3+
4+
## General
5+
* Fixes issue in `kit/lib/env.js`, where `isProduction` was always returning `false`
6+
7+
## Docker
8+
* Adds `Dockerfile`, for building a production web server Docker image
9+
* Adds `.dockerignore`, copied from the existing `.gitignore` to avoid unnecessary build context
10+
11+
## NPM
12+
* Removes `yarn.lock` -- the official advice is to avoid Yarn at present, due to certain third-party NPM packages relying on 'postinstall' hooks to build binaries from source
13+
* Adds `package-lock.json`, for faster builds with NPM v5
14+
* Explicitly adds `iltorb` and `node-zopfli`, binary packages required for Brotli and Zopfli compression respectively
15+
* Adds packages:
16+
"iltorb": "^1.3.1"
17+
"node-zopfli": "^2.0.2"
18+
119
1.6.0 - 2017-06-06
220
------------------------------------------------
321

Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM debian:jessie-slim
2+
3+
ENV EPHIMERAL_PACKAGES "build-essential autotools-dev curl xz-utils python"
4+
5+
# Add `package.json` to build Debian compatible NPM packages
6+
WORKDIR /src
7+
ADD package.json .
8+
9+
# install everything (and clean up afterwards)
10+
RUN apt-get update \
11+
&& apt-get install -y apt-utils \
12+
&& apt-get install -y ${EPHIMERAL_PACKAGES} \
13+
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
14+
&& apt-get install -y nodejs \
15+
&& cd /src \
16+
&& npm i \
17+
; apt-get remove --purge -y ${EPHIMERAL_PACKAGES} \
18+
; apt-get autoremove -y ${EPHIMERAL_PACKAGES} \
19+
; apt-get clean \
20+
; apt-get autoclean \
21+
; echo -n > /var/lib/apt/extended_states \
22+
; rm -rf /var/lib/apt/lists/* \
23+
; rm -rf /usr/share/man/?? \
24+
; rm -rf /usr/share/man/??_*
25+
26+
# Add the remaining project files
27+
ADD . .
28+
29+
# Build distribution
30+
RUN npm run build
31+
32+
# Set the default host/port
33+
ENV SERVER_PROD_HOST 0.0.0.0
34+
ENV SERVER_PROD_PORT 4000
35+
36+
# Start the server by default
37+
CMD npm run server

kit/lib/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const defaultPorts = {
1717
};
1818

1919
// Determines whether we're currently running in production
20-
const isProduction = !!process.env.NODE_ENV === 'production';
20+
const isProduction = process.env.NODE_ENV === 'production';
2121
const isServer = typeof SERVER !== 'undefined' && SERVER;
2222

2323
// Returns the prefix of the variable on `process.env` that determines

0 commit comments

Comments
 (0)