f688f9e530
# Conflicts: # docker/app-mysql/docker-compose.yml # docker/app-postgres/docker-compose.yml # docker/app-sqlite/docker-compose.yml # docs/en-US/release-notes.md # docs/zh-CN/release-notes.md # lerna.json # packages/app/client/package.json # packages/app/server/package.json # packages/core/acl/package.json # packages/core/actions/package.json # packages/core/build/package.json # packages/core/cache/package.json # packages/core/cli/package.json # packages/core/client/package.json # packages/core/create-nocobase-app/package.json # packages/core/database/package.json # packages/core/devtools/package.json # packages/core/dumi-theme-nocobase/package.json # packages/core/resourcer/package.json # packages/core/sdk/package.json # packages/core/server/package.json # packages/core/test/package.json # packages/core/utils/package.json # packages/plugins/acl/package.json # packages/plugins/audit-logs/package.json # packages/plugins/china-region/package.json # packages/plugins/client/package.json # packages/plugins/collection-manager/package.json # packages/plugins/error-handler/package.json # packages/plugins/export/package.json # packages/plugins/file-manager/package.json # packages/plugins/multi-app-manager/package.json # packages/plugins/notifications/package.json # packages/plugins/system-settings/package.json # packages/plugins/ui-routes-storage/package.json # packages/plugins/ui-schema-storage/package.json # packages/plugins/users/package.json # packages/plugins/verification/package.json # packages/plugins/workflow/package.json # packages/presets/nocobase/package.json
46 lines
1.4 KiB
Docker
46 lines
1.4 KiB
Docker
FROM node:16-stretch-slim as builder
|
|
|
|
WORKDIR /app
|
|
|
|
RUN cd /app \
|
|
&& yarn config set network-timeout 600000 -g \
|
|
&& yarn create nocobase-app my-nocobase-app -a -e APP_ENV=production \
|
|
&& cd /app/my-nocobase-app \
|
|
&& yarn install --production
|
|
|
|
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
|
|
|
|
# COPY ./sources.list /etc/apt/sources.list
|
|
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
|
&& case "${dpkgArch##*-}" in \
|
|
amd64) ARCH='x64';; \
|
|
ppc64el) ARCH='ppc64le';; \
|
|
s390x) ARCH='s390x';; \
|
|
arm64) ARCH='arm64';; \
|
|
armhf) ARCH='armv7l';; \
|
|
i386) ARCH='x86';; \
|
|
*) echo "unsupported architecture"; exit 1 ;; \
|
|
esac \
|
|
&& set -ex \
|
|
# libatomic1 for arm
|
|
&& apt-get update && apt-get install -y nginx
|
|
|
|
RUN rm -rf /etc/nginx/sites-enabled/default
|
|
COPY ./nocobase.conf /etc/nginx/sites-enabled/nocobase.conf
|
|
COPY --from=builder /app/nocobase.tar.gz /app/nocobase.tar.gz
|
|
|
|
WORKDIR /app/nocobase
|
|
|
|
COPY docker-entrypoint.sh /app/
|
|
# COPY docker-entrypoint.sh /usr/local/bin/
|
|
# ENTRYPOINT ["docker-entrypoint.sh"]
|
|
|
|
CMD ["/app/docker-entrypoint.sh"]
|