forked from LibrePhotos/librephotos-linux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (26 loc) · 1.1 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
FROM ubuntu:hirsute
ENV DEBIAN_FRONTEND noninteractive
ENV DOCKERDEPLOY true
RUN apt-get update && apt-get install -y systemd
RUN apt-get install gosu
COPY docker/systemctl.py /usr/bin/systemctl.py
RUN chmod +x /usr/bin/systemctl.py \
&& cp -f /usr/bin/systemctl.py /usr/bin/systemctl
COPY . librephotos-linux
WORKDIR /librephotos-linux
RUN ./install-librephotos.sh
RUN chown -R librephotos:librephotos /var/log/librephotos
RUN chown -R librephotos:librephotos /var/lib/librephotos/photos/
RUN chown -R librephotos:librephotos /var/lib/librephotos/data/protected_media/
ENV PGDATA /var/lib/postgresql/data
ENV POSTGRES_USER docker
ENV POSTGRES_PASSWORD AaAa1234
ENV POSTGRES_DB librephotos
RUN mkdir /docker-entrypoint-initdb.d
COPY ./docker/postgres-entrypoint.sh /usr/local/bin/
RUN chmod +rx /usr/lib/librephotos/bin/librephotos-worker
RUN chmod +rx /usr/local/bin/postgres-entrypoint.sh
# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PGDATA"
EXPOSE 3000
CMD ["/bin/bash","./docker/entrypoint.sh"]