Added ENV VAR setting for which port to run, flarum on inside the container. (#45)
parent
ba5878a341
commit
1c3f239b89
|
@ -17,7 +17,8 @@ ENV GID=991 \
|
|||
FLARUM_TITLE=Docker-Flarum \
|
||||
DEBUG=false \
|
||||
LOG_TO_STDOUT=false \
|
||||
GITHUB_TOKEN_AUTH=false
|
||||
GITHUB_TOKEN_AUTH=false \
|
||||
FLARUM_PORT=8888
|
||||
|
||||
RUN apk add --no-progress --no-cache \
|
||||
nginx \
|
||||
|
@ -25,6 +26,7 @@ RUN apk add --no-progress --no-cache \
|
|||
su-exec \
|
||||
curl \
|
||||
git \
|
||||
libcap \
|
||||
php7 \
|
||||
php7-fileinfo \
|
||||
php7-phar \
|
||||
|
@ -57,6 +59,6 @@ RUN apk add --no-progress --no-cache \
|
|||
|
||||
COPY rootfs /
|
||||
RUN chmod +x /usr/local/bin/* /services/*/run /services/.s6-svscan/*
|
||||
RUN setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/nginx
|
||||
VOLUME /flarum/app/extensions /etc/nginx/conf.d
|
||||
EXPOSE 8888
|
||||
CMD ["/usr/local/bin/startup"]
|
||||
|
|
|
@ -25,7 +25,7 @@ Simple forum software for building great communities. https://flarum.org/
|
|||
|
||||
### Ports
|
||||
|
||||
- **8888**
|
||||
- Default: **8888** (configurable)
|
||||
|
||||
### Volume
|
||||
|
||||
|
@ -47,6 +47,7 @@ Simple forum software for building great communities. https://flarum.org/
|
|||
| **DB_PASS** | MariaDB database password | **required** | none
|
||||
| **DB_PREF** | Flarum tables prefix | *optional* | none
|
||||
| **DB_PORT** | MariaDB database port | *optional* | 3306
|
||||
| **FLARUM_PORT** | Port to run Flarum on inside the container | *optional* | 8888
|
||||
| **UPLOAD_MAX_SIZE** | The maximum size of an uploaded file | *optional* | 50M
|
||||
| **PHP_MEMORY_LIMIT** | PHP memory limit | *optional* | 128M |
|
||||
| **OPCACHE_MEMORY_LIMIT** | OPcache memory size in megabytes | *optional* | 128
|
||||
|
|
|
@ -53,7 +53,7 @@ http {
|
|||
image/svg+xml;
|
||||
|
||||
server {
|
||||
listen 8888;
|
||||
listen <FLARUM_PORT>;
|
||||
charset utf-8;
|
||||
|
||||
root /flarum/app/public;
|
||||
|
|
|
@ -12,6 +12,7 @@ if [ -z "${FORUM_URL}" ]; then
|
|||
fi
|
||||
|
||||
# Set file config for nginx and php
|
||||
sed -i "s/<FLARUM_PORT>/${FLARUM_PORT}/g" /etc/nginx/nginx.conf
|
||||
sed -i "s/<UPLOAD_MAX_SIZE>/${UPLOAD_MAX_SIZE}/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf
|
||||
sed -i "s/<PHP_MEMORY_LIMIT>/${PHP_MEMORY_LIMIT}/g" /etc/php7/php-fpm.conf
|
||||
sed -i "s/<OPCACHE_MEMORY_LIMIT>/${OPCACHE_MEMORY_LIMIT}/g" /etc/php7/conf.d/00_opcache.ini
|
||||
|
|
Loading…
Reference in New Issue