build files for making podman containers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

63 lines
1.7 KiB

### Meta ###
FROM localhost/debian
ARG phpv=7.3
ARG psqlv=11
EXPOSE 80/tcp
### Basics ###
RUN apt update -y && apt install -y systemd sudo wget apache2 php-fpm \
php-gd php-zip php-pgsql php-curl php-mbstring php-intl php-imagick \
php-xml php-json redis-server php-redis postgresql postgresql-doc \
unzip php-ldap
RUN mkdir -p /srv/nextcloud/database /srv/nextcloud/files && chown -R www-data:www-data /srv/nextcloud
COPY resources/bin/ /usr/local/bin/
### Apache ###
RUN a2enmod rewrite headers env dir mime proxy_fcgi && a2enconf php${phpv}-fpm
COPY resources/apache/nextcloud.conf /etc/apache2/sites-available/
WORKDIR /etc/apache2/sites-enabled
RUN rm 000-default.conf && ln -s ../sites-available/nextcloud.conf
### PHP ###
RUN systemctl enable php${phpv}-fpm
COPY resources/php/php.ini /etc/php/${phpv}/fpm/
COPY resources/php/www.conf /etc/php/${phpv}/fpm/pool.d/
### Redis ###
COPY --chown=redis:redis resources/redis.conf /etc/redis/
RUN usermod -a -G redis www-data
### PostgreSQL ###
COPY --chown=postgres:postgres resources/postgresql/pg_hba.conf /etc/postgresql/${psqlv}/main/pg_hba.conf
COPY --chown=postgres:postgres resources/postgresql/redo.sql /usr/local/lib/psql/
### Nextcloud ###
WORKDIR /var/www/html
RUN wget https://download.nextcloud.com/server/releases/latest.zip && \
unzip latest.zip && \
chown -R www-data:www-data nextcloud && \
rm latest.zip
COPY --chown=www-data:www-data resources/my.config.php nextcloud/config/
# TODO: install apps via occ
### Crontab
WORKDIR /root
COPY resources/crontab .
RUN crontab -u www-data crontab && rm crontab
### Systemdfile ###
COPY Systemdfile /root/
RUN chmod +x /root/Systemdfile