dockerize

This commit is contained in:
bain 2024-08-02 16:40:32 +02:00
parent dc4f6ca9e1
commit 55f6e0f8dd
Signed by: bain
GPG key ID: 31F0F25E3BED0B9B
2 changed files with 33 additions and 0 deletions

32
Dockerfile Normal file
View file

@ -0,0 +1,32 @@
# Croodle Dockerfile.
#
# https://github.com/fuerst/croodle-docker
#
# Version 1.0
FROM php:8.0-apache
MAINTAINER Bernhard Fürst, bernhard.fuerst@fuerstnet.de
# You may overwrite the version.
# Use a release tag from https://github.com/jelhan/croodle/releases.
ENV CROODLE_VERSION v0.7.0
WORKDIR /var/www/html
# Run Apache on unprivileged Port
RUN sed -i 's/80/8080/g' /etc/apache2/ports.conf
# Install Cron
RUN apt-get update && apt-get -y install -qq cron
ADD crontab /etc/cron.d/croodle
RUN chmod 0644 /etc/cron.d/croodle
RUN crontab /etc/cron.d/croodle
# Grab and expand release files.
# RUN rm -rf * \
# && curl -SL -o croodle.tgz https://github.com/jelhan/croodle/releases/download/${CROODLE_VERSION}/croodle-${CROODLE_VERSION}.tar.gz \
# && tar zxf croodle.tgz \
# && rm croodle.tgz \
# && chmod 777 data
RUN rm -rf *
COPY dist/ /var/www/html

1
crontab Normal file
View file

@ -0,0 +1 @@
13 1 * * * cd /var/www/html && php api/cron.php > /proc/1/fd/1 2>/proc/1/fd/2