-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jonas Klarstrup
committed
Nov 4, 2017
1 parent
b612579
commit bc2d995
Showing
32 changed files
with
277 additions
and
10,420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"react", | ||
["env", { | ||
"targets": { | ||
"node": true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,3 @@ jspm_packages | |
|
||
# Distribution | ||
dist | ||
|
||
# dotenv environment variables file | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.8.4 | ||
2.9.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
FROM debian:jessie-slim | ||
FROM node:8-alpine | ||
|
||
ENV EPHIMERAL_PACKAGES "build-essential dh-autoreconf curl xz-utils python" | ||
ENV PACKAGES "libpng-dev" | ||
|
||
# Add `package.json` to build Debian compatible NPM packages | ||
WORKDIR /src | ||
ADD package.json . | ||
|
||
# install everything (and clean up afterwards) | ||
RUN apt-get update \ | ||
&& apt-get install -y apt-utils \ | ||
&& apt-get install -y ${EPHIMERAL_PACKAGES} ${PACKAGES} \ | ||
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \ | ||
&& apt-get install -y nodejs \ | ||
&& cd /src \ | ||
|
||
# The official image has verbose logging; change it to npm's default | ||
ENV NPM_CONFIG_LOGLEVEL notice | ||
|
||
# Add PM2, for Node process management | ||
RUN npm i -g pm2 | ||
|
||
# Add NPM package config | ||
ADD package*.json ./ | ||
|
||
# Install everything (and clean up afterwards) | ||
RUN apk add --no-cache --virtual .gyp \ | ||
autoconf \ | ||
automake \ | ||
g++ \ | ||
libpng-dev \ | ||
libtool \ | ||
make \ | ||
nasm \ | ||
python \ | ||
git \ | ||
&& npm i \ | ||
; apt-get remove --purge -y ${EPHIMERAL_PACKAGES} \ | ||
; apt-get autoremove -y ${EPHIMERAL_PACKAGES} \ | ||
; apt-get clean \ | ||
; apt-get autoclean \ | ||
; echo -n > /var/lib/apt/extended_states \ | ||
; rm -rf /var/lib/apt/lists/* \ | ||
; rm -rf /usr/share/man/?? \ | ||
; rm -rf /usr/share/man/??_* | ||
&& apk del .gyp | ||
|
||
# Add the remaining project files | ||
ADD . . | ||
|
||
# Build distribution | ||
RUN npm run build | ||
|
||
# Set the default host/port | ||
ENV HOST 0.0.0.0 | ||
ENV PORT 4000 | ||
|
||
# Build distribution | ||
RUN npm run build | ||
|
||
# Start the server by default | ||
CMD npm run server | ||
CMD pm2-docker start dist/server.js -i max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# By default, target only modern browsers | ||
|
||
last 3 versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
const defaultPreset = require('cssnano-preset-default'); | ||
|
||
module.exports = defaultPreset({ | ||
normalizeUrl: false, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Note: This is intended for use in local development | ||
version: '3.3' | ||
services: | ||
reactql-dev: | ||
build: . | ||
volumes: | ||
- .:/src | ||
- /src/node_modules | ||
ports: | ||
- 8080:8080 | ||
- 8081:8081 | ||
environment: | ||
HOST: "0.0.0.0" | ||
BROWSER_HOST: "0.0.0.0" | ||
PORT: "8081" | ||
command: npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Note: For production. For development, use `docker-compose.dev.yml` | ||
version: '3.3' | ||
services: | ||
reactql-dev: | ||
build: . | ||
volumes: | ||
- .:/src | ||
- /src/node_modules | ||
ports: | ||
- 4000:4000 | ||
environment: | ||
HOST: "0.0.0.0" | ||
BROWSER_HOST: "0.0.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
coverageReporters: ['text'], | ||
collectCoverageFrom: [ | ||
'src/**/*.js(x)', | ||
], | ||
transform: { | ||
'^.+\\.js(x)$': '<rootDir>/jest.transform.js', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
const babel = require('babel-jest'); | ||
|
||
module.exports = babel.createTransformer({ | ||
presets: [ | ||
'react', | ||
['env', { | ||
targets: { | ||
node: true, | ||
}, | ||
}], | ||
], | ||
plugins: [ | ||
['module-resolver', { | ||
root: ['.'], | ||
alias: { | ||
src: './src', | ||
}, | ||
}], | ||
'transform-object-rest-spread', | ||
'syntax-dynamic-import', | ||
'transform-regenerator', | ||
'transform-class-properties', | ||
'transform-decorators-legacy', | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.