diff --git a/CHANGELOG.md b/CHANGELOG.md index 31e9a99..c67678c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # CHANGELOG -## UNRELEASED +## 2.2.3 - 2021/01/08 +* Change docker base to alpine ## 2.2.2 - 2020/03/22 * Stop auto-sorting tables diff --git a/Dockerfile b/Dockerfile index ac3870a..f7b18b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,20 +2,22 @@ FROM alpine:3 LABEL maintainer="Varakh" +ENV APP_HOME /var/www/html/application + # setup folder structure -RUN mkdir -p /var/www/data/snapshots && \ - mkdir -p /var/www/log && \ - touch /var/www/log/application.log && \ - mkdir -p /var/www/config +RUN mkdir -p ${APP_HOME}/data/snapshots && \ + mkdir -p ${APP_HOME}/log && \ + touch ${APP_HOME}/log/application.log && \ + mkdir -p ${APP_HOME}/config # add upstream application -ADD src /var/www/src -ADD public /var/www/public -ADD composer.json /var/www/composer.json -ADD composer.lock /var/www/composer.lock -ADD data /var/www/data -ADD config /var/www/config -RUN mv /var/www/config/env.example /var/www/config/env +ADD src ${APP_HOME}/src +ADD public ${APP_HOME}/public +ADD composer.json ${APP_HOME}/composer.json +ADD composer.lock ${APP_HOME}/composer.lock +ADD data ${APP_HOME}/data +ADD config ${APP_HOME}/config +RUN mv ${APP_HOME}/config/env.example ${APP_HOME}/config/env # php.ini ENV PHP_MEMORY_LIMIT 512M @@ -59,10 +61,10 @@ RUN apk add --update --no-cache \ sed -i "s|;*max_file_uploads =.*|max_file_uploads = ${PHP_MAX_FILE_UPLOAD}|i" /etc/php7/php.ini && \ sed -i "s|;*post_max_size =.*|post_max_size = ${PHP_MAX_POST}|i" /etc/php7/php.ini && \ # prepare application - cd /var/www && composer install && \ + cd ${APP_HOME} && composer install && \ # clean up and permissions rm -rf /var/cache/apk/* && \ - chown nobody:nginx -R /var/www + chown nobody:nginx -R ${APP_HOME} # Add nginx config ADD docker/nginx.conf /etc/nginx/nginx.conf diff --git a/README.md b/README.md index 0440464..f30b236 100755 --- a/README.md +++ b/README.md @@ -64,11 +64,11 @@ The following section outlines a manual setup. Feel free to use the provided `do `fixed docker IP` which your teamspeak uses. `localhost` is not valid if you're using it in docker. If you're unsure, please take a look at the example `docker-compose.yml` files. 4. Start a container using the docker image `varakh/ts3web` and provide the following bindings for volumes: - * `{env_file_volume|host_file}:/var/www/config/env` - * `{snapshot_volume|host_folder}:/var/www/data/snapshots` - * `{log_volume|host_folder}:/var/www/log` + * `{env_file_volume|host_file}:/var/www/html/applicationconfig/env` + * `{snapshot_volume|host_folder}:/var/www/html/application/data/snapshots` + * `{log_volume|host_folder}:/var/www/html/application/log` 5. [Ensure that you're whitelisting the IP from which the webinterface will issue commands.](#whitelist) -6. Run the `docker run` command including your settings, volumes and networks (if any): `docker run --name teamspeak_web -v ./env:/var/www/config/env -p 8181:80 varakh/ts3web:latest`. +6. Run the `docker run` command including your settings, volumes and networks (if any): `docker run --name teamspeak_web -v ./env:/var/www/html/application/config/env -p 8181:80 varakh/ts3web:latest`. #### docker-compose @@ -108,9 +108,9 @@ services: container_name: teamspeak_web image: varakh/ts3web:latest volumes: - - ./env:/var/www/config/env - - ./snapshots:/var/www/data/snapshots - - ./log:/var/www/log + - ./env:/var/www/html/application/config/env + - ./snapshots:/var/www/html/application/data/snapshots + - ./log:/var/www/html/application/log ports: - 127.0.0.1:8181:80 depends_on: @@ -155,9 +155,9 @@ services: container_name: teamspeak_web image: varakh/ts3web:latest volumes: - - ./env:/var/www/config/env - - ./snapshots:/var/www/data/snapshots - - ./log:/var/www/log + - ./env:/var/www/html/application/config/env + - ./snapshots:/var/www/html/application/data/snapshots + - ./log:/var/www/html/application/log ports: - 127.0.0.1:8181:80 depends_on: diff --git a/config/Constants.php b/config/Constants.php index 87f1643..f01ceec 100644 --- a/config/Constants.php +++ b/config/Constants.php @@ -8,12 +8,12 @@ class Constants /** * Years tag */ - const YEARS = '2020'; + const YEARS = '2020-2021'; /** * Version tag */ - const VERSION = '2.2.3-SNAPSHOT'; + const VERSION = '2.2.3'; /** * Return constant by it's class name diff --git a/docker/nginx.conf b/docker/nginx.conf index 8052611..70b59d3 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -17,7 +17,7 @@ http { server { listen 80; - root /var/www/public; + root /var/www/html/application/public; index index.php index.html; rewrite_log on;