mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:46:45 +00:00
b359f9eac6
* feat: supports subdirectory deployment * feat: auto publicPath * fix: buildIndexHtml * fix: format * fix: regexp * fix: test error * fix: nocobase.conf * fix: path * fix: nocobase.conf * fix: bugs * fix: resourcer prefix * fix: cas
44 lines
1.1 KiB
Docker
44 lines
1.1 KiB
Docker
FROM node:18-bullseye-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 nocobase.tar.gz \
|
|
&& tar -zcf ./nocobase.tar.gz -C /app/my-nocobase-app .
|
|
|
|
FROM node:18-bullseye-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 --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"]
|
|
|
|
EXPOSE 80/tcp
|
|
|
|
CMD ["/app/docker-entrypoint.sh"]
|