-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
34 lines (25 loc) · 1.09 KB
/
Dockerfile
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
FROM python:3.10-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends --no-install-suggests redis-server curl && \
addgroup --gid 1001 --system easylogs && \
adduser --no-create-home --shell /bin/false --disabled-password --uid 1001 --system --group easylogs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY requirements.freeze.txt .
COPY requirements-deployment.txt .
RUN pip install --disable-pip-version-check --no-cache-dir -r /requirements.freeze.txt -r /requirements-deployment.txt
# Install MongoDB for standalone mode
RUN curl https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian11-6.0.2.tgz -o mongo.tgz && \
tar -xzf mongo.tgz && \
mkdir -p /data/db/mongo && \
mv mongodb-linux-x86_64-debian11-6.0.2 /usr/local/mongodb && \
rm mongo.tgz
COPY ./entrypoint.sh ./usr/local/bin/entrypoint
RUN chmod +x /usr/local/bin/entrypoint
COPY ./deployment/gunicorn.conf.py /gunicorn.conf.py
COPY ./easy_logs ./easy_logs
RUN chown -R easylogs:easylogs /easy_logs
EXPOSE 8080
#USER easylogs
WORKDIR /
CMD ["entrypoint"]