Skip to content

Commit

Permalink
dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
shashankbrgowda committed May 2, 2024
1 parent a02c601 commit 2d97a25
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
20 changes: 20 additions & 0 deletions plugin.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# syntax=docker/dockerfile:1

FROM alpine AS setup
WORKDIR /app
COPY ["package.json", "yarn.lock", ".yarnrc.yml", "./"]
COPY [".yarn", "./.yarn"]
COPY packages packages
RUN find packages/ -type f \! \( -name "package.json" -o -name "yarn.lock" \) -delete
RUN find . -type d -empty -delete

FROM node:18 AS build
WORKDIR /app
COPY --from=setup /app .
RUN yarn install --immutable
COPY . .
WORKDIR /app/packages/jbrowse-plugin-apollo
RUN yarn build

FROM httpd:alpine
COPY --from=build /app/packages/jbrowse-plugin-apollo/dist /usr/local/apache2/htdocs
19 changes: 19 additions & 0 deletions server.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# syntax=docker/dockerfile:1

FROM alpine AS setup
WORKDIR /app
COPY ["package.json", "yarn.lock", ".yarnrc.yml", "./"]
COPY [".yarn", ".yarn"]
COPY packages packages
RUN find packages/ -type f \! \( -name "package.json" -o -name "yarn.lock" \) -delete
RUN find . -type d -empty -delete

FROM node:18
WORKDIR /app
COPY --from=setup /app .
RUN yarn install --immutable
COPY . .
WORKDIR /app/packages/apollo-collaboration-server
RUN yarn build
EXPOSE 3999
CMD ["yarn", "start:prod"]

0 comments on commit 2d97a25

Please sign in to comment.