Skip to content

Commit

Permalink
Unify graph & manage builds
Browse files Browse the repository at this point in the history
  • Loading branch information
solocommand committed Jun 12, 2019
1 parent cc9e4b5 commit 5299d3b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
11 changes: 7 additions & 4 deletions services/graphql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM node:10.15
WORKDIR /identity-x
ENV NODE_ENV production
ADD ./ /id-me
WORKDIR /id-me
ARG SERVICE

RUN yarn --production
ADD package.json yarn.lock /identity-x/
ADD packages /identity-x/packages
ADD services/$SERVICE /identity-x/services/$SERVICE
RUN yarn --production --pure-lockfile

WORKDIR /id-me/services/graphql
WORKDIR /identity-x/services/$SERVICE
ENTRYPOINT [ "node", "src/index.js" ]
12 changes: 7 additions & 5 deletions services/manage/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM danlynn/ember-cli:3.9.0 as ember
WORKDIR /id-me
COPY package.json yarn.lock /id-me/
COPY ./services/manage /id-me/services/manage/
WORKDIR /identity-x

ADD package.json yarn.lock /identity-x/
ADD packages /identity-x/packages
ADD services/manage /identity-x/services/manage
RUN yarn
WORKDIR /id-me/services/manage
WORKDIR /identity-x/services/manage
RUN ember build --env=production

FROM nginx:alpine
COPY --from=ember /id-me/services/manage/dist /id-me/services/manage/dist
COPY --from=ember /identity-x/services/manage/dist /identity-x/services/manage/dist
COPY ./services/manage/nginx.conf /etc/nginx/conf.d/manage.conf
2 changes: 1 addition & 1 deletion services/manage/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ server {
gunzip on;
listen 80 default_server;
listen [::]:80 default_server;
root /id-me/services/manage/dist;
root /identity-x/services/manage/dist;
index index.html;
location / {
try_files $uri $uri/ /index.html;
Expand Down

0 comments on commit 5299d3b

Please sign in to comment.