Skip to content

Commit 3019cb0

Browse files
committed
Copy sql files in Dockerfile, copy also to /home/ejabberd/database/sql/
1 parent 76ab164 commit 3019cb0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ecs/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ WORKDIR $HOME
108108
COPY --from=builder /ejabberd/runtime .
109109
COPY bin/* bin/
110110
COPY --from=api /go/bin/ejabberdapi bin/ejabberdapi
111-
RUN chmod 755 bin/ejabberdctl bin/ejabberdapi bin/erl bin/captcha*.sh
111+
RUN chmod 755 bin/ejabberdctl bin/ejabberdapi bin/erl bin/captcha*.sh \
112+
&& mkdir -p /home/ejabberd/sql \
113+
&& cp /home/ejabberd/lib/ejabberd-*/priv/sql/* /home/ejabberd/database/ \
114+
&& cp /home/ejabberd/lib/ejabberd-*/priv/sql/* /home/ejabberd/sql/
112115
COPY --chown=ejabberd:ejabberd conf conf/
113116
ADD --chown=ejabberd:ejabberd https://download.process-one.net/cacert.pem conf/cacert.pem
114117

ecs/bin/ejabberdctl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ stop_epmd()
285285

286286
# make sure node not already running and node name unregistered
287287
# if all ok, ensure runtime directory exists and make it current directory
288-
# then (docker case) make .sql files available on database volume
289288
check_start()
290289
{
291290
[ -n "$ERL_DIST_PORT" ] && return
@@ -302,7 +301,6 @@ check_start()
302301
}
303302
"$EPMD" -kill >/dev/null
304303
}
305-
cp "$HOME_DIR"/lib/ejabberd-*/priv/sql/* "$HOME_DIR/database/"
306304
}
307305

308306
post_waiter_fork()

0 commit comments

Comments
 (0)