FROM debian:bullseye

# Set timezone to Amsterdam.
RUN ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime

# Copy just the apt stuff (and the install script) first, because postgres
# does not like it when its config is present before installation.
COPY app/files/etc/apt /etc/apt
COPY app/files/root/install /root/install

RUN /root/install

# Now copy everything:
COPY app/files /

RUN /root/setup

VOLUME /var/lib/eloquent
VOLUME /var/lib/postgresql

CMD service apache2 start; service postgresql start; exec bash
