-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-masterBranch
45 lines (32 loc) · 1.68 KB
/
Dockerfile-masterBranch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# NOTE: This docker container is built automatically
# from Travis-CI after passing unit tests
FROM minidocks/weasyprint:latest
COPY . /code
WORKDIR /code
# Update apt-get
RUN apk update -qq
# Install packages needed for weasyprint
RUN apk add -qq pango gcc libc-dev python3-dev npm
# Upgrade pip3 and install the requirements
RUN pip3 install --upgrade pip
RUN pip install -U pip setuptools wheel ruamel.yaml.clib==0.2.7
RUN pip3 install --requirement requirements.txt
# Install the npm modules we use for generating some Bible content in JSON format
RUN cd converters/pdf/resources && npm ci
RUN cd converters/add_gl_quotes_to_tsv && npm ci
ENV WORKER_NAME "worker-1"
CMD rq worker --config rq_settings --name $WORKER_NAME-$(date +%s)
# Define environment variables
# NOTE: The following environment variables are expected to be set:
# AWS_ACCESS_KEY_ID
# AWS_SECRET_ACCESS_KEY
# REDIS_URL (can be omitted for testing to use a local instance)
# GRAPHITE_HOSTNAME (defaults to localhost if missing)
# NOTE: The following environment variables are optional:
# DEBUG_MODE (can be set to any non-blank string to run in debug mode for testing)
# QUEUE_PREFIX (defaults to '', set to dev- for testing)
# QUEUE_SUFFIX (defaults to '', set to a number if running multiple containers)
# NOTE: To build use:
# docker build --file Dockerfile-masterBranch --tag unfoldingword/tx_job_handler:master .
# To run in production use with the desired values:
# docker run --env AWS_ACCESS_KEY_ID=<access_key> --env AWS_SECRET_ACCESS_KEY=<sa_key> --env GRAPHITE_HOSTNAME=<graphite_hostname> --env REDIS_URL=<redis_url> --net="host" --name tx_job_handler --detach --rm tx_job_handler:master