feat(olares-app): add olares-app code (#2284)
This commit is contained in:
54
apps/docker/admin/dockerfile
Normal file
54
apps/docker/admin/dockerfile
Normal file
@@ -0,0 +1,54 @@
|
||||
FROM node:16.13.1-alpine as server_dist
|
||||
|
||||
WORKDIR /server_dist
|
||||
|
||||
# Only copy over the packages files of all required packages.
|
||||
# This will ensure that we don't have to install all dependencies
|
||||
# again if any source files change.
|
||||
COPY package*.json lerna.json tsconfig.json ./
|
||||
COPY packages/admin/package*.json ./packages/admin/
|
||||
COPY packages/sdk/package*.json ./packages/sdk/
|
||||
# COPY packages/locale/package*.json ./packages/locale/
|
||||
# Install dependencies and bootstrap packages
|
||||
RUN npm ci --unsafe-perm
|
||||
|
||||
# Now copy over source files and assets
|
||||
COPY packages/admin/src ./packages/admin/src
|
||||
COPY packages/sdk/src ./packages/sdk/src
|
||||
# COPY packages/locale/src ./packages/locale/src
|
||||
# COPY packages/locale/res ./packages/locale/res
|
||||
COPY packages/admin/tsconfig.json ./packages/admin/
|
||||
COPY packages/sdk/tsconfig.json ./packages/sdk/
|
||||
# COPY packages/locale/tsconfig*.json ./packages/locale/
|
||||
COPY packages/admin/webpack.config.js ./packages/admin/webpack.config.js
|
||||
|
||||
RUN npm run admin:build
|
||||
|
||||
|
||||
|
||||
FROM node:16.13.1 as server_dist2
|
||||
|
||||
WORKDIR /server_dist2/packages/admin
|
||||
|
||||
COPY --from=server_dist /server_dist/packages/admin/dist/package*.json .
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY --from=server_dist /server_dist/packages/admin/dist/ .
|
||||
|
||||
|
||||
|
||||
FROM node:16.13.1-buster-slim
|
||||
|
||||
EXPOSE 3010
|
||||
ENV PL_ASSETS_DIR=/assets
|
||||
#ENV PL_ATTACHMENTS_DIR=/attachments
|
||||
ENV PL_SERVER_CLIENT_URL=http://localhost
|
||||
|
||||
WORKDIR /padloc/packages/admin
|
||||
|
||||
COPY --from=server_dist2 /server_dist2/packages/admin/ .
|
||||
|
||||
ENTRYPOINT ["npm", "run"]
|
||||
|
||||
CMD [ "server"]
|
||||
Reference in New Issue
Block a user