update docker setup to use node 8.9.0, update npm packages to make docker work

This commit is contained in:
Cassie Tarakajian 2017-11-06 16:19:43 -05:00
parent cdf7a41bf9
commit 22cd8920a1
8 changed files with 1623 additions and 8172 deletions

View file

@ -1,4 +1,4 @@
FROM node:6.11.2
FROM node:8.9.0
ENV APP_HOME=/opt/node/app \
TERM=xterm
@ -9,7 +9,7 @@ WORKDIR $APP_HOME
# Install node modules
RUN git submodule init && \
yarn install
npm install
# For development, mark the directory as a mount override point
VOLUME $APP_HOME

View file

@ -50,7 +50,7 @@ you may have on the same computer that use different/conflicting versions, etc.
* Windows: https://www.docker.com/docker-windows
2. Clone this repostory and cd into it
3. `$ docker-compose build`
4. `$ docker-compose run --rm server yarn run fetch-examples`
4. `$ docker-compose run --rm server npm run fetch-examples`
Now, anytime you wish to start the server with its dependencies, you can run:

View file

@ -4,7 +4,7 @@ services:
image: mongo:3.4.7
server:
build: .
command: yarn start
command: npm start
environment:
- API_URL=/api
- MONGO_URL=mongodb://mongo:27017/p5js-web-editor

2069
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -31,7 +31,7 @@
"babel-preset-react-hmre": "^1.1.1",
"babel-preset-react-optimize": "^1.0.1",
"babel-preset-stage-0": "^6.5.0",
"chunk-manifest-webpack-plugin": "^0.1.0",
"chunk-manifest-webpack-plugin": "^1.1.2",
"css-loader": "^0.23.1",
"cssnano": "^3.7.1",
"eslint": "^3.14.0",
@ -39,20 +39,20 @@
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^3.0.2",
"eslint-plugin-react": "^6.9.0",
"extract-text-webpack-plugin": "^1.0.1",
"extract-text-webpack-plugin": "^2.1.2",
"file-loader": "^0.8.5",
"node-sass": "^3.7.0",
"node-sass": "^4.5.3",
"nodemon": "^1.9.2",
"postcss-cssnext": "^2.7.0",
"postcss-focus": "^1.0.0",
"postcss-loader": "^0.9.1",
"postcss-reporter": "^1.3.3",
"sass-loader": "^3.2.0",
"sass-loader": "^6.0.6",
"style-loader": "^0.13.1",
"webpack-manifest-plugin": "^1.1.0"
},
"engines": {
"node": ">=6"
"node": ">=8.9.0"
},
"dependencies": {
"archiver": "^1.1.0",
@ -124,7 +124,7 @@
"shortid": "^2.2.6",
"srcdoc-polyfill": "^0.2.0",
"url": "^0.11.0",
"webpack": "^1.14.0",
"webpack": "^2.6.1",
"webpack-dev-middleware": "^1.6.1",
"webpack-hot-middleware": "^2.10.0",
"xhr": "^2.2.1"

View file

@ -19,7 +19,7 @@ module.exports = {
publicPath: '/dist/'
},
resolve: {
extensions: ['', '.js', '.jsx'],
extensions: ['.js', '.jsx'],
modules: [
'client',
'node_modules'
@ -50,19 +50,19 @@ module.exports = {
{
test: /\.jsx?$/,
exclude: [/node_modules/, /.+\.config.js/],
loaders: ['babel', 'eslint-loader']
loaders: ['babel-loader', 'eslint-loader']
},
{
test: /\.scss$/,
loaders: ['style', 'css', 'sass']
loaders: ['style-loader', 'css-loader', 'sass-loader']
},
{
test: /\.(svg|mp3)$/,
loader: 'file'
loader: 'file-loader'
},
{
test: /fonts\/.*\.(eot|svg|ttf|woff|woff2)$/,
loader: 'file'
loader: 'file-loader'
}
],
},

View file

@ -43,7 +43,7 @@ module.exports = {
},
resolve: {
extensions: ['', '.js', '.jsx'],
extensions: ['.js', '.jsx'],
modules: [
'client',
'node_modules',
@ -55,20 +55,23 @@ module.exports = {
{
test: /\.scss$/,
exclude: /node_modules/,
loader: ExtractTextPlugin.extract('style', 'css!sass!postcss')
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader!sass-loader!postcss-loader'
})
},
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel'
loader: 'babel-loader'
},
{
test: /\.(svg|mp3)$/,
loader: 'file'
loader: 'file-loader'
},
{
test: /fonts\/.*\.(eot|svg|ttf|woff|woff2)$/,
loader: 'file'
loader: 'file-loader'
}
]
},
@ -87,7 +90,7 @@ module.exports = {
minChunks: Infinity,
filename: 'vendor.js',
}),
new ExtractTextPlugin('app.[chunkhash].css', { allChunks: true }),
new ExtractTextPlugin({ filename: 'app.[chunkhash].css', allChunks: true }),
new ManifestPlugin({
basePath: '/',
}),
@ -99,9 +102,9 @@ module.exports = {
compress: {
warnings: false
}
})
],
}),
new webpack.LoaderOptionsPlugin({
options: {
postcss: () => [
postcssFocus(),
cssnext({
@ -114,4 +117,8 @@ module.exports = {
clearMessages: true
})
]
}
})
],
};

7657
yarn.lock

File diff suppressed because it is too large Load diff