feat: add default password for mysql (#392)

This commit is contained in:
Товарищ программист
2021-12-23 12:43:04 +08:00
committed by GitHub
parent c88edc4d3e
commit caa1ffe3c8

View File

@ -17,7 +17,10 @@ LABEL MAINTAINER="https://casdoor.org/"
COPY --from=BACK /go/src/casdoor/ ./ COPY --from=BACK /go/src/casdoor/ ./
COPY --from=BACK /usr/bin/wait-for-it ./ COPY --from=BACK /usr/bin/wait-for-it ./
COPY --from=FRONT /web/build /web/build 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 CMD chmod 777 /tmp && service mariadb start&&\
if [ "${MYSQL_ROOT_PASSWORD}" = "" ] ;then MYSQL_ROOT_PASSWORD=123456 ; fi&&\
mysqladmin -u root password ${MYSQL_ROOT_PASSWORD} &&\
./wait-for-it localhost:3306 -- ./server
FROM alpine:latest FROM alpine:latest