Commit cb863684 authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

Merge branch 'mysql-wait' into 'develop'

updated to check for mysql is ready

See merge request !4
parents 74c5e46e 8ffec525
......@@ -34,6 +34,10 @@ WORKDIR /openair-udr
COPY . /openair-udr
RUN cp -Rf /openair-udr-ext-ref /openair-udr/build/ext
# wait for it
WORKDIR /
RUN git clone https://github.com/vishnubob/wait-for-it.git
# Building UDR
WORKDIR /openair-udr/build/scripts
RUN ./build_udr --clean --Verbose --build-type Release --jobs
......@@ -68,6 +72,7 @@ RUN apt-get update && \
WORKDIR /openair-udr/bin
COPY --from=oai-udr-builder /openair-udr/build/udr/build/udr oai_udr
COPY --from=oai-udr-builder /openair-udr/scripts/entrypoint.sh .
COPY --from=oai-udr-builder /wait-for-it/wait-for-it.sh .
COPY --from=oai-udr-builder /usr/local/lib/libpistache.so /usr/local/lib/
RUN ldconfig
......
......@@ -61,6 +61,10 @@ RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.pr
WORKDIR /openair-udr
COPY . /openair-udr
# wait for it
WORKDIR /
RUN git clone https://github.com/vishnubob/wait-for-it.git
# Installing and Building UDR
WORKDIR /openair-udr/build/scripts
RUN ./build_udr --install-deps --force
......@@ -94,6 +98,7 @@ RUN yum update -y && \
WORKDIR /openair-udr/bin
COPY --from=oai-udr-builder /openair-udr/build/udr/build/udr oai_udr
COPY --from=oai-udr-builder /openair-udr/scripts/entrypoint.sh .
COPY --from=oai-udr-builder /wait-for-it/wait-for-it.sh .
WORKDIR /usr/local/lib64
COPY --from=oai-udr-builder /usr/local/lib64/libpistache.so.0 .
......
......@@ -50,6 +50,10 @@ RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.pr
WORKDIR /openair-udr
COPY . /openair-udr
# wait for it
WORKDIR /
RUN git clone https://github.com/vishnubob/wait-for-it.git
# Installing and Building UDR
WORKDIR /openair-udr/build/scripts
RUN ./build_udr --install-deps --force
......@@ -85,6 +89,7 @@ RUN apt-get update && \
WORKDIR /openair-udr/bin
COPY --from=oai-udr-builder /openair-udr/build/udr/build/udr oai_udr
COPY --from=oai-udr-builder /openair-udr/scripts/entrypoint.sh .
COPY --from=oai-udr-builder /wait-for-it/wait-for-it.sh .
COPY --from=oai-udr-builder /usr/local/lib/libpistache.so /usr/local/lib/
RUN ldconfig
......
......@@ -27,4 +27,9 @@ for c in ${CONFIG_DIR}/*.conf; do
sed -i "${EXPRESSIONS}" ${c}
done
# check the mysql is ready
pushd /openair-udr/bin
./wait-for-it.sh ${MYSQL_IPV4_ADDRESS}:3306 -t 60
popd
exec "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment