feat(adding in a way to run interactive processes):
Issue: NA - [ ] It works! - [ ] Comments provide sufficient explanations for the next contributor - [ ] Tests cover changes and corner cases - [ ] Follows Quay syntax patterns and format
This commit is contained in:
parent
572eeca8f5
commit
72264cbdad
2 changed files with 35 additions and 1 deletions
|
@ -36,7 +36,6 @@ COPY . .
|
||||||
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin /etc/monit static/fonts static/ldn /usr/local/nginx/logs/ \
|
RUN mkdir -p /etc/my_init.d /etc/systlog-ng /usr/local/bin /etc/monit static/fonts static/ldn /usr/local/nginx/logs/ \
|
||||||
&& cp $QUAYCONF/init/*.sh /etc/my_init.d/ \
|
&& cp $QUAYCONF/init/*.sh /etc/my_init.d/ \
|
||||||
&& cp $QUAYCONF/init/syslog-ng.conf /etc/syslog-ng/ \
|
&& cp $QUAYCONF/init/syslog-ng.conf /etc/syslog-ng/ \
|
||||||
&& cp -r $QUAYCONF/init/service/* /etc/service \
|
|
||||||
&& cp $QUAYCONF/kill-buildmanager.sh /usr/local/bin/kill-buildmanager.sh \
|
&& cp $QUAYCONF/kill-buildmanager.sh /usr/local/bin/kill-buildmanager.sh \
|
||||||
&& cp $QUAYCONF/monitrc /etc/monit/monitrc \
|
&& cp $QUAYCONF/monitrc /etc/monit/monitrc \
|
||||||
&& chmod 0600 /etc/monit/monitrc \
|
&& chmod 0600 /etc/monit/monitrc \
|
||||||
|
@ -53,3 +52,5 @@ RUN ln -s $QUAYCONF /conf
|
||||||
# && rm -rf /root/.npm /.npm /usr/local/lib/node_modules /usr/share/yarn/node_modules \
|
# && rm -rf /root/.npm /.npm /usr/local/lib/node_modules /usr/share/yarn/node_modules \
|
||||||
# /root/node_modules /node_modules /grunt
|
# /root/node_modules /node_modules /grunt
|
||||||
RUN PYTHONPATH=$QUAYPATH venv/bin/alembic heads | grep -E '^[0-9a-f]+ \(head\)$' > ALEMBIC_HEAD
|
RUN PYTHONPATH=$QUAYPATH venv/bin/alembic heads | grep -E '^[0-9a-f]+ \(head\)$' > ALEMBIC_HEAD
|
||||||
|
|
||||||
|
CMD ./quay-entrypoint.sh
|
33
quay-entrypoint.sh
Executable file
33
quay-entrypoint.sh
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
MODE="$1"
|
||||||
|
|
||||||
|
display_usage() {
|
||||||
|
echo "This script takes one arguments."
|
||||||
|
echo -e "\nUsage: ${0} <interactive|batch|both>\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ "${MODE}" = "help" ]]
|
||||||
|
then
|
||||||
|
display_usage
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
case "$MODE" in
|
||||||
|
"interactive")
|
||||||
|
echo "Copying $MODE files"
|
||||||
|
cp -r ${QUAYCONF}/init/service/interactive/* /etc/service
|
||||||
|
;;
|
||||||
|
"batch")
|
||||||
|
echo "Copying $MODE files"
|
||||||
|
cp -r ${QUAYCONF}/init/service/batch/* /etc/service
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Copying all files"
|
||||||
|
cp -r ${QUAYCONF}/init/service/interactive/* /etc/service
|
||||||
|
cp -r ${QUAYCONF}/init/service/batch/* /etc/service
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
/sbin/my_init
|
Reference in a new issue