diff --git a/services/graphql/Dockerfile b/services/graphql/Dockerfile index a193f273..5a144e9c 100644 --- a/services/graphql/Dockerfile +++ b/services/graphql/Dockerfile @@ -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" ] diff --git a/services/manage/Dockerfile b/services/manage/Dockerfile index 46964238..3b79fdbf 100644 --- a/services/manage/Dockerfile +++ b/services/manage/Dockerfile @@ -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 diff --git a/services/manage/nginx.conf b/services/manage/nginx.conf index 9f8db066..05daa0a1 100644 --- a/services/manage/nginx.conf +++ b/services/manage/nginx.conf @@ -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;