unee-t / frontend

Meteor front end
https://case.dev.unee-t.com/
GNU Affero General Public License v3.0
9 stars 17 forks source link

Move away from using ulexus/meteor:build #863

Closed kaihendry closed 4 years ago

kaihendry commented 5 years ago

We should focus on using our Dockerfile, so that means moving away from using s3://unee-t-media/frontend/commit/${COMMIT}.tar.gz that:

Currently use.

kaihendry commented 4 years ago

We have a workable Dockerfile, with thanks to https://github.com/CyCoreSystems/docker-meteor/issues/62

FROM node:8 AS builder

RUN curl -sL https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh
RUN mkdir /src /bundle
RUN chown -R node /src /bundle

USER node:node

WORKDIR /src
COPY --chown=node:node . .
RUN meteor npm install --production
RUN meteor build --architecture os.linux.x86_64 --directory /bundle
RUN cd /bundle/bundle/programs/server && npm install

FROM node:8-slim

USER node:node

COPY --from=builder /bundle /app
WORKDIR /app/bundle

ENV PORT 3000
EXPOSE 3000

CMD ["node", "./main.js"]

Though integrating this into our CI is a little painful. We probably need a new repo on https://hub.docker.com/r/uneet/

kaihendry commented 4 years ago

This is implemented in dev https://github.com/unee-t/frontend/commit/37c0b548035fedd8b7b9ac2c78c48e7bf33125de