-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathDockerfile.worker
45 lines (40 loc) · 1.24 KB
/
Dockerfile.worker
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
FROM ubuntu:24.04
LABEL maintainer="[email protected]"
ENV PYTHONUNBUFFERED=1
RUN apt-get -y update && \
apt-get install -y \
software-properties-common \
build-essential \
supervisor \
cron \
pkg-config \
libmysqlclient-dev \
mysql-client \
python3-dev \
python3-full \
python3-pip \
libjpeg-dev \
libcurl4-openssl-dev \
curl \
run-one \
ffmpeg \
wget \
vim \
libpcre3 \
libpcre3-dev \
libssl-dev \
libffi-dev && \
rm -rf /var/lib/apt/lists/* && \
groupadd mltshp --gid=1010 && \
useradd mltshp --create-home --home-dir=/home/mltshp \
--uid=1010 --gid=1010 && \
mkdir -p /srv/mltshp.com/logs && \
chown -R mltshp:mltshp /srv/mltshp.com
COPY requirements.txt /tmp
RUN pip install --break-system-packages -r /tmp/requirements.txt && rm /tmp/requirements.txt
COPY setup/production/supervisord-worker.conf /etc/supervisor/conf.d/mltshp.conf
# NOTE: /srv/mltshp.com/logs should be a mounted volume for this image
ADD . /srv/mltshp.com/mltshp
WORKDIR /srv/mltshp.com/mltshp
RUN crontab -u mltshp setup/production/mltshp-worker--crontab
CMD ["/usr/bin/supervisord"]