<commit_before>#
# Docker Stack - Docker stack to manage infrastructures
#
# Copyright 2014 devops.center
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM devopscenter/66ccff.web:dcSTACK_VERSION
MAINTAINER josh < josh [at] devops {dot} center>

# Flower port
EXPOSE 5555

ADD web.sh /installs/worker.sh
WORKDIR /installs

RUN ./worker.sh

# Setup config to run pgpool, celery, and flower in this container
# (basically don't run uwsgi)

RUN rm -rf /etc/supervisor/conf.d/uwsgi.conf

ADD conf/supervisor-flower.conf /etc/supervisor/conf.d/flower.conf 
ADD conf/supervisor-celery.conf /etc/supervisor/conf.d/celery.conf
ADD conf/run_celery.sh /etc/supervisor/conf.d/run_celery.sh


# Run supervisor in this container, in foreground mode. However first establish link for logging container,
# then grab any app-supplied configs for celery and flower (if present),
# then remove stale PIDs which prevented pgpool from successfully running from a container that is restarted.

CMD ln -sf /var/run/rsyslog/dev/log /dev/log && \
    if [ -e /app-utils/conf/supervisor-celery.conf ]; then cp /app-utils/conf/supervisor-celery.conf /etc/supervisor/conf.d/celery.conf; fi && \
    if [ -e /app-utils/conf/supervisor-flower.conf ]; then cp /app-utils/conf/supervisor-flower.conf //etc/supervisor/conf.d/flower.conf; fi && \
    if [ -e /app-utils/conf/run_celery.sh ]; then cp /app-utils/conf/run_celery.sh /etc/supervisor/conf.d/; fi && \
    rm -rf /var/run/pgpool/.s.* && \
    rm -rf /tmp/.s.* && \
    rm -rf /var/run/pgpool/pgpool.pid && \<commit_msg>fix directory reference<commit_after>#
# Docker Stack - Docker stack to manage infrastructures
#
# Copyright 2014 devops.center
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM devopscenter/66ccff.web:dcSTACK_VERSION
MAINTAINER josh < josh [at] devops {dot} center>

# Flower port
EXPOSE 5555

ADD worker.sh /installs/worker.sh
WORKDIR /installs

RUN ./worker.sh

# Setup config to run pgpool, celery, and flower in this container
# (basically don't run uwsgi)

RUN rm -rf /etc/supervisor/conf.d/uwsgi.conf

ADD conf/supervisor-flower.conf /etc/supervisor/conf.d/flower.conf 
ADD conf/supervisor-celery.conf /etc/supervisor/conf.d/celery.conf
ADD conf/run_celery.sh /etc/supervisor/conf.d/run_celery.sh


# Run supervisor in this container, in foreground mode. However first establish link for logging container,
# then grab any app-supplied configs for celery and flower (if present),
# then remove stale PIDs which prevented pgpool from successfully running from a container that is restarted.

CMD ln -sf /var/run/rsyslog/dev/log /dev/log && \
    if [ -e /app-utils/conf/supervisor-celery.conf ]; then cp /app-utils/conf/supervisor-celery.conf /etc/supervisor/conf.d/celery.conf; fi && \
    if [ -e /app-utils/conf/supervisor-flower.conf ]; then cp /app-utils/conf/supervisor-flower.conf //etc/supervisor/conf.d/flower.conf; fi && \
    if [ -e /app-utils/conf/run_celery.sh ]; then cp /app-utils/conf/run_celery.sh /etc/supervisor/conf.d/; fi && \
    rm -rf /var/run/pgpool/.s.* && \
    rm -rf /tmp/.s.* && \
    rm -rf /var/run/pgpool/pgpool.pid && \
{'fraction_non_alphanumeric': 0.11238141571393821, 'fraction_numerical': 0.006810994891753831, 'mean_word_length': 3.604703247480403, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7461554', 'n_tokens_mistral': 1365, 'n_tokens_neox': 1311, 'n_words': 436}