2024-11-09 15:05:26 -05:00
|
|
|
FROM ubuntu:noble AS frontend
|
2018-09-11 22:25:09 -07:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y wget software-properties-common && \
|
2024-11-09 15:05:26 -05:00
|
|
|
echo "deb https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
|
|
|
|
wget -q -O- https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | apt-key add - && \
|
2018-09-11 22:25:09 -07:00
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y nodejs
|
|
|
|
|
|
|
|
ADD . /tmp/code/
|
|
|
|
|
|
|
|
RUN cd /tmp/code && \
|
|
|
|
npm install && \
|
|
|
|
./node_modules/.bin/grunt
|
|
|
|
|
2024-11-09 15:05:26 -05:00
|
|
|
FROM ubuntu:noble AS app
|
2018-09-11 22:25:09 -07:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
2021-08-28 20:18:35 -07:00
|
|
|
apt-get install -y wget gnupg && \
|
2024-11-09 15:05:26 -05:00
|
|
|
wget -qO- http://artifact.scc.net.davepedu.com/repo/apt/extpython/dists/noble/install | bash -x /dev/stdin && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y extpython-python3.13 libmagic1 ffmpeg && \
|
2021-08-28 20:18:35 -07:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2024-11-09 15:05:26 -05:00
|
|
|
ENV PATH=/opt/extpython/3.13/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
2018-09-11 22:25:09 -07:00
|
|
|
|
2020-11-15 16:49:22 -08:00
|
|
|
ADD . /tmp/code/
|
2019-07-06 13:49:16 -07:00
|
|
|
COPY --from=frontend /tmp/code/styles/dist/style.css /tmp/code/styles/dist/style.css
|
|
|
|
|
2019-11-14 21:28:32 -08:00
|
|
|
RUN cd /tmp/code && \
|
2019-07-06 11:25:15 -07:00
|
|
|
pip3 install -r requirements.txt && \
|
2018-09-11 22:25:09 -07:00
|
|
|
python3 setup.py install && \
|
2024-11-10 09:37:53 -05:00
|
|
|
userdel --remove ubuntu && \
|
2019-07-06 13:49:16 -07:00
|
|
|
useradd --uid 1000 app && \
|
|
|
|
rm -rf /tmp/code
|
2018-09-11 22:25:09 -07:00
|
|
|
|
|
|
|
VOLUME /srv/library
|
|
|
|
VOLUME /srv/cache
|
|
|
|
VOLUME /srv/db
|
|
|
|
|
|
|
|
USER app
|
2019-07-11 19:26:22 -07:00
|
|
|
ENV CACHE_URL=file://./tmp/cache
|
2018-09-11 22:25:09 -07:00
|
|
|
|
2019-07-06 11:25:15 -07:00
|
|
|
ENTRYPOINT ["photoappd"]
|