Skip to content

Commit

Permalink
update casdoor Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
haobibo committed Apr 12, 2024
1 parent 18b7c59 commit 7d6a092
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion docker_casdoor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ARG BASE_NAMESPACE
ARG BASE_IMG_BUILD="go-stack"
ARG BASE_IMG="base"
ARG BASE_IMG="node"

FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG_BUILD} as builder
COPY work /opt/utils/
Expand All @@ -13,6 +13,8 @@ RUN source /opt/utils/script-setup-casdoor.sh \
FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG}
COPY --from=builder /opt/casdoor /opt/casdoor
COPY work/app.conf /opt/casdoor/conf/app.conf
RUN mkdir -pv /root/web && ln -sf /opt/casdoor/web/build /root/web/

LABEL maintainer="haobibo@gmail.com"
ENV RUNNING_IN_DOCKER true
WORKDIR /opt/casdoor
Expand Down
8 changes: 4 additions & 4 deletions docker_casdoor/demo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ services:
/bin/bash -l -c '
ls -alh /opt/casdoor
echo "driverName = postgres" >> /opt/casdoor/conf/app.conf
echo "dataSourceName = \"user=postgres password=postgres host=db-postgres port=5432 sslmode=disable dbname=casdoor\"" >> /opt/casdoor/conf/app.conf
echo "dataSourceName = \"user=postgres password=postgres host=db-postgres port=5432 sslmode=disable dbname=casdoor\"" >> /opt/casdoor/conf/app.conf
sleep 8s
# /opt/casdoor/server --createDatabase=true
'
cat /opt/casdoor/conf/app.conf
/opt/casdoor/server -createDatabase=true'
environment:
RUNNING_IN_DOCKER: "true"
ports:
- 8080:8080
- 8000:8000
depends_on:
- db-postgres
healthcheck:
Expand Down

0 comments on commit 7d6a092

Please sign in to comment.