Install npm and celery on Transtats and restore route annotations

Credits go to suanand for providing the patch.
This commit is contained in:
Mikolaj Izdebski 2019-02-21 15:39:23 +01:00
parent 6ea07e8871
commit 1e46efdc75
4 changed files with 18 additions and 4 deletions

View file

@ -39,6 +39,8 @@
file: route.yml
serviceport: web
servicename: transtats-web
annotations:
haproxy.router.openshift.io/timeout: 8m
- role: openshift/object
app: transtats
file: deploymentconfig.yml

View file

@ -12,7 +12,7 @@ spec:
USER root
RUN useradd -ms /bin/bash tsuser
RUN dnf -y update && \
dnf -y install git make cpio koji file patch intltool libtool gtk3-devel && \
dnf -y install git make cpio koji file patch intltool libtool gtk3-devel npm supervisor redis && \
dnf clean all
RUN mkdir /workspace
ENV PYTHONUNBUFFERED 1
@ -21,8 +21,15 @@ spec:
RUN pip3 install -r /workspace/requirements/base.txt
RUN cp deploy/docker-compose/transtats/launch.sh /usr/bin/transtats.sh
RUN cp deploy/docker-compose/transtats/wait-for-it.sh /usr/bin/wait-for-it.sh
RUN mkdir staticfiles
RUN chmod g+w transtats/logs dashboard/sandbox staticfiles
RUN cp deploy/docker/conf/redis.ini /etc/supervisord.d/
RUN cp deploy/docker/conf/transtats_celery.ini /etc/supervisord.d/
RUN cp deploy/docker/conf/transtats_celerybeat.ini /etc/supervisord.d/
RUN mkdir staticfiles false run transtats/logs/celery
RUN touch /workspace/transtats/logs/celery/redis.log
RUN touch /workspace/transtats/logs/celery/redis_err.log
RUN touch /workspace/transtats/logs/celery/transtats_worker.log
RUN touch /workspace/transtats/logs/celery/transtats_beat.log
RUN chmod -R g+w transtats/logs transtats/node dashboard/sandbox staticfiles false run
RUN chown -R tsuser /workspace
EXPOSE 8080
USER tsuser
@ -30,6 +37,7 @@ spec:
type: Dockerfile
strategy:
dockerStrategy:
noCache: true
env:
- name: UPGRADE_PIP_TO_LATEST
value: "true"

View file

@ -23,7 +23,7 @@ spec:
- containerPort: 8080
env:
- name: GUNICORN_CMD_ARGS
value: "--workers 3 --bind 0.0.0.0:8080 --timeout 400"
value: "--workers 3 --bind 0.0.0.0:8080 --timeout 500"
- name: DATABASE_ENGINE
value: postgresql
- name: DATABASE_NAME

View file

@ -1,6 +1,10 @@
apiVersion: v1
kind: Route
metadata:
{% if annotations is defined %}
annotations:
{{ annotations | to_nice_yaml | indent(4) }}
{% endif %}
name: {{ routename }}
labels:
app: {{ app }}