commit 981be342843aefd9b224f3099d9881b6bcf58143 Author: jannisp Date: Thu Apr 1 13:51:42 2021 +0200 Initial setup diff --git a/.env b/.env new file mode 100644 index 0000000..6d94dd1 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +MYSQL_ROOT_PASSWORD=secret +PORT=8080 diff --git a/000-default.conf b/000-default.conf new file mode 100644 index 0000000..ada9770 --- /dev/null +++ b/000-default.conf @@ -0,0 +1,31 @@ + + # The ServerName directive sets the request scheme, hostname and port that + # the server uses to identify itself. This is used when creating + # redirection URLs. In the context of virtual hosts, the ServerName + # specifies what hostname must appear in the request's Host: header to + # match this virtual host. For the default virtual host (this file) this + # value is not decisive as it is used as a last resort host regardless. + # However, you must set it for any further virtual host explicitly. + #ServerName www.example.com + + ServerAdmin example@localhost + DocumentRoot /var/www/uvdesk/public + + # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, + # error, crit, alert, emerg. + # It is also possible to configure the loglevel for particular + # modules, e.g. + #LogLevel info ssl:warn + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + + # For most configuration files from conf-available/, which are + # enabled or disabled at a global level, it is possible to + # include a line for only one particular virtual host. For example the + # following line enables the CGI configuration for this host only + # after it has been globally disabled with "a2disconf". + #Include conf-available/serve-cgi-bin.conf + + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..40035c6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM php:7.4-apache + +# Install wget +RUN apt-get update && apt-get install -y wget unzip + +# Install PHP extensions +RUN apt-get install -y libc-client-dev libkrb5-dev && rm -r /var/lib/apt/lists/* && docker-php-ext-configure imap --with-kerberos --with-imap-ssl && docker-php-ext-install imap +RUN pecl install mailparse && \ + docker-php-ext-enable mailparse +RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql + +# Download files +RUN wget -O download.zip https://cdn.uvdesk.com/uvdesk/downloads/opensource/uvdesk-community-current-stable.zip +RUN unzip download.zip && \ + rm download.zip + +# Move to correct location +RUN mv uvdesk-* ../uvdesk +WORKDIR /var/www + +# Set apache settings +COPY 000-default.conf /etc/apache2/sites-available/000-default.conf +RUN a2enmod rewrite && service apache2 restart + +# Change owner +RUN chown -R www-data /var/www/uvdesk diff --git a/README.md b/README.md new file mode 100644 index 0000000..4511711 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# uvdesk +Docker stack to seploy uvdesk ticketing system + +## Run +1. Setup `.env` +2. `docker-compose up -d --build` + +## Just build +`docker build . [-t uvdesk:latest-stable]` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2326c81 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3.1' + +services: + db: + image: mariadb + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} + + app: + build: . + ports: + - ${PORT}:80 + links: + - db \ No newline at end of file