Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dependencies for VoteIT #71

Merged
merged 9 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
26 changes: 7 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
FROM ubuntu:14.04
MAINTAINER Erik Axelsson <[email protected]>
FROM node:12.16.1-buster

# install our dependencies and nodejs
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list
RUN echo "deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu trusty main " > /etc/apt/sources.list
RUN apt-get update
RUN apt-get -y install nodejs
LABEL maintainer="[email protected]"

# use changes to package.json to force Docker not to use the cache
# when we change our application's nodejs dependencies:
ADD package.json /tmp/package.json
RUN cd /tmp && npm install
RUN mkdir -p /opt/app && cp -a /tmp/node_modules /opt/app/
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm ci

# From here we load our application's code in, therefore the previous docker
# "layer" thats been cached will be used if possible
WORKDIR /opt/app
ADD . /opt/app
COPY . .
bark marked this conversation as resolved.
Show resolved Hide resolved

EXPOSE 3000

CMD ["node", "app.js"]
CMD ["npm", "start"]
11 changes: 6 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ var b = browserify(opts);

// add transformations here
b.transform(reactify);
b.transform("babelify", {presets: ["es2015", "react"]});
b.transform("babelify", {presets: ["env", "react"]});
bark marked this conversation as resolved.
Show resolved Hide resolved

gulp.task('default', ['js', 'css']);
gulp.task('css', bundleCSS);
gulp.task('js', bundle); // so you can run `gulp js` to build the file
b.on('update', bundle); // on any dep update, runs the bundler
b.on('log', gutil.log); // output build logs to terminal

Expand Down Expand Up @@ -51,4 +48,8 @@ function bundleCSS() {
.on('error', gutil.log.bind(gutil, 'Autoprefixer Error'))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./public'));
}
}

exports.default = gulp.parallel(bundle,bundleCSS);
exports.css = bundleCSS;
exports.js = bundle;
Loading