mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Allowed to change swoole port in docker image by using the PORT env var
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
FROM php:7.4.9-alpine3.12 as base
|
FROM php:7.4.9-alpine3.12 as base
|
||||||
|
|
||||||
ARG SHLINK_VERSION=2.2.2
|
ARG SHLINK_VERSION=2.3.0
|
||||||
ENV SHLINK_VERSION ${SHLINK_VERSION}
|
ENV SHLINK_VERSION ${SHLINK_VERSION}
|
||||||
ENV SWOOLE_VERSION 4.5.2
|
ENV SWOOLE_VERSION 4.5.2
|
||||||
ENV LC_ALL "C"
|
ENV LC_ALL "C"
|
||||||
@@ -44,7 +44,7 @@ RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS && \
|
|||||||
# Install shlink
|
# Install shlink
|
||||||
FROM base as builder
|
FROM base as builder
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=composer:1.10.1 /usr/bin/composer ./composer.phar
|
COPY --from=composer:1.10.13 /usr/bin/composer ./composer.phar
|
||||||
RUN apk add --no-cache git && \
|
RUN apk add --no-cache git && \
|
||||||
php composer.phar install --no-dev --optimize-autoloader --prefer-dist --no-progress --no-interaction && \
|
php composer.phar install --no-dev --optimize-autoloader --prefer-dist --no-progress --no-interaction && \
|
||||||
php composer.phar clear-cache && \
|
php composer.phar clear-cache && \
|
||||||
@@ -59,7 +59,7 @@ LABEL maintainer="Alejandro Celaya <alejandro@alejandrocelaya.com>"
|
|||||||
COPY --from=builder /etc/shlink .
|
COPY --from=builder /etc/shlink .
|
||||||
RUN ln -s /etc/shlink/bin/cli /usr/local/bin/shlink
|
RUN ln -s /etc/shlink/bin/cli /usr/local/bin/shlink
|
||||||
|
|
||||||
# Expose swoole port
|
# Expose default swoole port
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
# Expose params config dir, since the user is expected to provide custom config from there
|
# Expose params config dir, since the user is expected to provide custom config from there
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ return [
|
|||||||
|
|
||||||
'mezzio-swoole' => [
|
'mezzio-swoole' => [
|
||||||
'swoole-http-server' => [
|
'swoole-http-server' => [
|
||||||
|
'port' => (int) env('PORT', 8080),
|
||||||
'options' => [
|
'options' => [
|
||||||
'worker_num' => (int) env('WEB_WORKER_NUM', 16),
|
'worker_num' => (int) env('WEB_WORKER_NUM', 16),
|
||||||
'task_worker_num' => (int) env('TASK_WORKER_NUM', 16),
|
'task_worker_num' => (int) env('TASK_WORKER_NUM', 16),
|
||||||
|
|||||||
Reference in New Issue
Block a user