nocobase/Dockerfile.acr

65 lines
2.6 KiB
Docker
Raw Normal View History

Feat/collection templates (#1124) * feat: add collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: calendar collection template * feat: no id does not support sorting * feat: collection template edit * feat: collectiom templates code improve * feat: collection template supports configurable field interface * feat: collection template supports configurable field interface * feat: establish relation field when there is no id * feat: collection templates * feat: collection templates locale * feat: calendar collection * feat: calendar collection default fields * feat: code optimization * feat: code optimization * feat: code optimization * feat: collectin template fix * feat: add sample-custom-collection-template * feat: code optimization * feat: code optimization * feat: code optimization * feat: code optimization * feat: import code * feat: collection template local * feat: code opimization * feat: code opimization * feat: code opimization * feat: code opimization * feat: code opimization * feat: collection template local * feat: collection template local * fix(collection-manager): exclude reverse parameters when overriding * feat: update docs * feat: disabled * feat: improve code * feat: update submodule * feat: submodules: true * fix: token * fix: with ssh-key * fix: update dockerfile * fix: ci * fix: ci * fix: ci * fix: ci * fix: --no-verify-access * fix: ci * fix: ci * fix: ci * fix: missing env * fix: env Co-authored-by: chenos <chenlinxh@gmail.com> Co-authored-by: chareice <chareice@live.com>
2022-11-29 03:31:30 +00:00
FROM node:16 as builder
ARG VERDACCIO_URL=http://host.docker.internal:10104/
ARG COMIT_HASH
RUN apt-get update && apt-get install -y jq
WORKDIR /tmp
COPY . /tmp
RUN npx npm-cli-adduser --username test --password test -e test@nocobase.com -r $VERDACCIO_URL
RUN cd /tmp && \
2022-12-05 15:21:17 +00:00
NEWVERSION="$(cat lerna.json | jq '.version' | tr -d '"').$(date +'%Y%m%d%H%M%S')" \
Feat/collection templates (#1124) * feat: add collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: calendar collection template * feat: no id does not support sorting * feat: collection template edit * feat: collectiom templates code improve * feat: collection template supports configurable field interface * feat: collection template supports configurable field interface * feat: establish relation field when there is no id * feat: collection templates * feat: collection templates locale * feat: calendar collection * feat: calendar collection default fields * feat: code optimization * feat: code optimization * feat: code optimization * feat: collectin template fix * feat: add sample-custom-collection-template * feat: code optimization * feat: code optimization * feat: code optimization * feat: code optimization * feat: import code * feat: collection template local * feat: code opimization * feat: code opimization * feat: code opimization * feat: code opimization * feat: code opimization * feat: collection template local * feat: collection template local * fix(collection-manager): exclude reverse parameters when overriding * feat: update docs * feat: disabled * feat: improve code * feat: update submodule * feat: submodules: true * fix: token * fix: with ssh-key * fix: update dockerfile * fix: ci * fix: ci * fix: ci * fix: ci * fix: --no-verify-access * fix: ci * fix: ci * fix: ci * fix: missing env * fix: env Co-authored-by: chenos <chenlinxh@gmail.com> Co-authored-by: chareice <chareice@live.com>
2022-11-29 03:31:30 +00:00
&& tmp=$(mktemp) \
&& jq ".version = \"${NEWVERSION}\"" lerna.json > "$tmp" && mv "$tmp" lerna.json
RUN yarn install && yarn nocobase install && yarn pm add graph-collection-manager && yarn build
RUN git checkout -b release \
&& yarn version:alpha -y
RUN cd packages/pro-plugins && git checkout -b release \
&& git config user.email "test@mail.com" \
&& git config user.name "test" && git add . \
&& git commit -m "chore(versions): test publish packages xxx"
RUN git config user.email "test@mail.com" \
&& git config user.name "test" && git add . \
&& git commit -m "chore(versions): test publish packages xxx" \
&& git submodule update --init --recursive -- packages/pro-plugins
RUN yarn release:force --no-verify-access --no-git-reset --registry $VERDACCIO_URL
RUN yarn config set registry $VERDACCIO_URL
WORKDIR /app
RUN cd /app \
&& yarn config set network-timeout 600000 -g \
&& yarn create nocobase-app my-nocobase-app -a \
-e APP_ENV=production \
-e PLUGIN_PACKAGE_PREFIX=@nocobase/plugin-,@nocobase/preset-,@nocobase/plugin-pro- \
-e PRESET_NOCOBASE_PLUGINS=error-handler,collection-manager,ui-schema-storage,ui-routes-storage,file-manager,system-settings,verification,users,acl,china-region,workflow,client,export,import,sequence-field,audit-logs,graph-collection-manager \
Feat/collection templates (#1124) * feat: add collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: collection templates * feat: calendar collection template * feat: no id does not support sorting * feat: collection template edit * feat: collectiom templates code improve * feat: collection template supports configurable field interface * feat: collection template supports configurable field interface * feat: establish relation field when there is no id * feat: collection templates * feat: collection templates locale * feat: calendar collection * feat: calendar collection default fields * feat: code optimization * feat: code optimization * feat: code optimization * feat: collectin template fix * feat: add sample-custom-collection-template * feat: code optimization * feat: code optimization * feat: code optimization * feat: code optimization * feat: import code * feat: collection template local * feat: code opimization * feat: code opimization * feat: code opimization * feat: code opimization * feat: code opimization * feat: collection template local * feat: collection template local * fix(collection-manager): exclude reverse parameters when overriding * feat: update docs * feat: disabled * feat: improve code * feat: update submodule * feat: submodules: true * fix: token * fix: with ssh-key * fix: update dockerfile * fix: ci * fix: ci * fix: ci * fix: ci * fix: --no-verify-access * fix: ci * fix: ci * fix: ci * fix: missing env * fix: env Co-authored-by: chenos <chenlinxh@gmail.com> Co-authored-by: chareice <chareice@live.com>
2022-11-29 03:31:30 +00:00
&& cd /app/my-nocobase-app \
&& yarn install --production \
&& yarn add @nocobase/plugin-pro-graph-collection-manager -W
RUN cd /app \
&& rm -rf my-nocobase-app/packages/app/client/src/.umi \
&& rm -rf nocobase.tar.gz \
&& find ./my-nocobase-app/node_modules/china-division/dist -name '*.csv' -delete \
&& find ./my-nocobase-app/node_modules/china-division/dist -name '*.sqlite' -delete \
&& tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app .
FROM node:16-stretch-slim
RUN apt-get update && apt-get install -y nginx
RUN rm -rf /etc/nginx/sites-enabled/default
COPY ./docker/nocobase/nocobase.conf /etc/nginx/sites-enabled/nocobase.conf
COPY --from=builder /app/nocobase.tar.gz /app/nocobase.tar.gz
WORKDIR /app/nocobase
RUN mkdir -p /app/nocobase/storage/uploads/ && echo "$COMIT_HASH" >> /app/nocobase/storage/uploads/COMIT_HASH
COPY ./docker/nocobase/docker-entrypoint.sh /app/
CMD ["/app/docker-entrypoint.sh"]