feat: add all-in-one version (#389)

Signed-off-by: Товарищ программист <2962928213@qq.com>
This commit is contained in:
Товарищ программист
2021-12-22 21:58:25 +08:00
committed by GitHub
parent 8dcb56ea71
commit 3bdc0e0d1b
2 changed files with 20 additions and 1 deletions

View File

@ -10,6 +10,16 @@ COPY ./web .
RUN yarn config set registry https://registry.npm.taobao.org
RUN yarn install && yarn run build
FROM debian:latest AS ALLINONE
RUN apt update && apt install -y mariadb-server mariadb-client&&mkdir -p web/build && chmod 777 /tmp
LABEL MAINTAINER="https://casdoor.org/"
COPY --from=BACK /go/src/casdoor/ ./
COPY --from=BACK /usr/bin/wait-for-it ./
COPY --from=FRONT /web/build /web/build
CMD chmod 777 /tmp && service mariadb start&& mysqladmin -u root password ${MYSQL_ROOT_PASSWORD} &&./wait-for-it localhost:3306 -- ./server
FROM alpine:latest
RUN sed -i 's/https/http/' /etc/apk/repositories
RUN apk add curl
@ -19,4 +29,5 @@ COPY --from=BACK /go/src/casdoor/ ./
COPY --from=BACK /usr/bin/wait-for-it ./
RUN mkdir -p web/build && apk add --no-cache bash coreutils
COPY --from=FRONT /web/build /web/build
CMD ./wait-for-it db:3306 -- ./server
CMD ./wait-for-it db:3306 -- ./server