mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-08 04:00:51 +08:00
feat: add all-in-one version (#389)
Signed-off-by: Товарищ программист <2962928213@qq.com>
This commit is contained in:

committed by
GitHub

parent
8dcb56ea71
commit
3bdc0e0d1b
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -92,3 +92,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: casbin/casdoor:${{steps.get-current-tag.outputs.tag }},casbin/casdoor:latest
|
tags: casbin/casdoor:${{steps.get-current-tag.outputs.tag }},casbin/casdoor:latest
|
||||||
|
|
||||||
|
- name: Push All In One Version to Docker Hub
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
if: github.repository == 'casbin/casdoor' && github.event_name == 'push' && steps.should_push.outputs.push=='true'
|
||||||
|
with:
|
||||||
|
target: ALLINONE
|
||||||
|
push: true
|
||||||
|
tags: casbin/casdoor-all-in-one:${{steps.get-current-tag.outputs.tag }},casbin/casdoor-all-in-one:latest
|
||||||
|
11
Dockerfile
11
Dockerfile
@@ -10,6 +10,16 @@ COPY ./web .
|
|||||||
RUN yarn config set registry https://registry.npm.taobao.org
|
RUN yarn config set registry https://registry.npm.taobao.org
|
||||||
RUN yarn install && yarn run build
|
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
|
FROM alpine:latest
|
||||||
RUN sed -i 's/https/http/' /etc/apk/repositories
|
RUN sed -i 's/https/http/' /etc/apk/repositories
|
||||||
RUN apk add curl
|
RUN apk add curl
|
||||||
@@ -20,3 +30,4 @@ COPY --from=BACK /usr/bin/wait-for-it ./
|
|||||||
RUN mkdir -p web/build && apk add --no-cache bash coreutils
|
RUN mkdir -p web/build && apk add --no-cache bash coreutils
|
||||||
COPY --from=FRONT /web/build /web/build
|
COPY --from=FRONT /web/build /web/build
|
||||||
CMD ./wait-for-it db:3306 -- ./server
|
CMD ./wait-for-it db:3306 -- ./server
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user