Skip to content

meteor update to 1.8.1 and new multistage Dockerfile #750

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

Closed
wants to merge 4 commits into from
Closed
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
8 changes: 4 additions & 4 deletions .meteor/packages
Original file line number Diff line number Diff line change
@@ -6,19 +6,19 @@

[email protected] # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
[email protected].0 # The database Meteor supports right now
[email protected].2 # The database Meteor supports right now
[email protected] # Compile .html files into Meteor Blaze views
[email protected] # Reactive variable for tracker
[email protected] # Meteor's client-side reactive programming library

[email protected].0 # JS minifier run for production mode
[email protected].1 # JS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers
[email protected].3 # Enable ECMAScript2015+ syntax in app code
[email protected].4 # Enable ECMAScript2015+ syntax in app code
[email protected] # Server-side component of the `meteor shell` command

react-meteor-data
[email protected]
[email protected].1
[email protected].2
juliancwirko:postcss
nathantreid:css-modules@=3.1.4
dburles:factory
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[email protected].0.1
[email protected]
32 changes: 16 additions & 16 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[email protected]
[email protected]
[email protected]
autoupdate@1.5.0
babel-compiler@7.2.3
autoupdate@1.6.0
babel-compiler@7.3.4
[email protected]
[email protected]
[email protected]
@@ -22,18 +22,18 @@ [email protected]
[email protected]
[email protected]
[email protected]
ddp-server@2.2.0
ddp-server@2.3.0
[email protected]
[email protected]
[email protected]
[email protected].3
[email protected].7
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
hasse:[email protected]
[email protected]
@@ -48,36 +48,36 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].2
[email protected].3
[email protected]
[email protected].1
[email protected].0
[email protected].2
[email protected].1
[email protected]
[email protected]
[email protected]
[email protected].3
[email protected].4
[email protected]
[email protected]
[email protected].0
[email protected].0
[email protected].2
[email protected].1
[email protected]
[email protected]
nathantreid:[email protected]
[email protected]
[email protected].1
[email protected].2
[email protected]
omega:[email protected]
[email protected]
pauldowman:[email protected]
percolate:[email protected]
practicalmeteor:[email protected]_1
practicalmeteor:[email protected]_2
[email protected].1
[email protected].2
[email protected]
[email protected]
[email protected]
[email protected]
reload@1.2.0
reload@1.3.0
[email protected]
[email protected]
[email protected]
@@ -88,7 +88,7 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected]
[email protected]
@@ -98,5 +98,5 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].2
[email protected].3
[email protected]
38 changes: 23 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
FROM node:8.11.4 AS builder
FROM node:8.15.1 AS builder

# For some reason, the container ships with an old version of npm
RUN npm install -g npm

RUN su -c "curl -o /tmp/meteor.sh 'https://install.meteor.com?release=1.8.0.2'; sh /tmp/meteor.sh; rm -f /tmp/meteor.sh" node
RUN cp "/home/node/.meteor/packages/meteor-tool/1.8.0_2/mt-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor
RUN mkdir /src /bundle
RUN chown -R node /src /bundle
ENV BUNDLE_DIR /home/node/bundle
ENV SRC_DIR /home/node/src
ENV TMP_DIR /home/node/tmp

USER node:node

WORKDIR /src
COPY --chown=node:node . .
RUN mkdir -p $SRC_DIR $BUNDLE_DIR $TMP_DIR
COPY --chown=node:node . $SRC_DIR

RUN curl -o $TMP_DIR/meteor.sh 'https://install.meteor.com?release=1.8.1'; sh $TMP_DIR/meteor.sh

ENV PATH="/home/node/.meteor:${PATH}"
WORKDIR $SRC_DIR
RUN npm i
RUN meteor npm install --production
RUN meteor build --directory /bundle
RUN cd /bundle/bundle/programs/server && npm install
RUN meteor build --server-only --directory $BUNDLE_DIR
RUN cd ${BUNDLE_DIR}/bundle/programs/server && npm install

FROM node:8.11.4-slim
FROM node:8.15.1-slim

ENV APP_DIR /home/node/app
ENV BUNDLE_DIR /home/node/bundle

USER node:node

COPY --from=builder /bundle /app
WORKDIR /app/bundle
COPY --from=builder $BUNDLE_DIR $APP_DIR
WORKDIR $APP_DIR/bundle


ENV PORT 3000
EXPOSE 3000


CMD ["node", "./main.js"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -103,11 +103,11 @@ If your Frontend datastore MongoDB out of sync with your [Bugzilla database's
profiles](https://documentation.unee-t.com/2018/03/01/introduction-to-the-demo-environment/),
you need to create the users in the users manually:

Accounts.createUser({ email: 'leonel@mailinator.com', password: 'leonel', profile: { bzLogin: 'leonel@mailinator.com', bzPass: 'leonel' }})
Accounts.createUser({ email: 'leonel@case.dev.unee-t.com', password: 'leonel', profile: { bzLogin: 'leonel@case.dev.unee-t.com', bzPass: 'leonel' }})

Ensure it worked by looking at the `npm start` log. Next you might want to verify each user's email address.

db.users.update({'emails.address': 'leonel@mailinator.com'}, {$set : {'emails.0.verified': true}})
db.users.update({'emails.address': 'leonel@case.dev.unee-t.com'}, {$set : {'emails.0.verified': true}})

## How to test the notifications / email templates?

9 changes: 0 additions & 9 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -9,17 +9,8 @@ phases:
pre_build:
commands:
- $(aws ecr get-login --no-include-email --region ${AWS_REGION})
install:
commands:
- echo Installing Meteor
- curl https://install.meteor.com/ | sh
build:
commands:
- meteor npm install
- 'sed -i "s,<\!-- COMMIT: -->,<\!-- COMMIT: $CODEBUILD_SOURCE_VERSION $CODEBUILD_RESOLVED_SOURCE_VERSION -->,g" client/main.html'
- meteor build --directory /tmp/export-meteor/build --allow-superuser
- printf "FROM ulexus/meteor:build\nCOPY build /home/meteor/www\nRUN chown -R meteor:meteor /home/meteor/\n" >/tmp/export-meteor/Dockerfile
- cd /tmp/export-meteor
- docker build -t ${APP} -t ${APP}:$CODEBUILD_RESOLVED_SOURCE_VERSION .
- docker tag ${APP}:$CODEBUILD_RESOLVED_SOURCE_VERSION ${ACCOUNT}.dkr.ecr.${AWS_REGION}.amazonaws.com/${APP}:$CODEBUILD_RESOLVED_SOURCE_VERSION
- docker tag ${APP}:latest ${ACCOUNT}.dkr.ecr.${AWS_REGION}.amazonaws.com/${APP}:latest
5,703 changes: 0 additions & 5,703 deletions package-lock.json

This file was deleted.