This repository has been archived by the owner on Feb 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
39 lines (32 loc) · 1.41 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM zaherg/php-swoole:7.2
ARG BUILD_DATE
ARG VCS_REF
ARG IMAGE_NAME
LABEL Maintainer="Zaher Ghaibeh <z@zah.me>" \
Description="Lightweight PHP 7.2 container based on Alpine Linux with Swoole installed and enabled by default." \
org.label-schema.name=$IMAGE_NAME \
org.label-schema.description="Lightweight PHP 7.2 container based on Alpine Linux with Swoole installed and enabled by default." \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://github.com/linuxjuggler/lumen-starter.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.schema-version="1.0.0"
ENV APP_ENV ${APP_ENV:-production}
ENV APP_DEBUG ${APP_DEBUG:-false}
ENV APP_TIMEZONE ${APP_TIMEZONE:-UTC}
ENV DB_CONNECTION ${DB_CONNECTION:-mysql}
ENV DB_HOST ${DB_HOST:-database}
ENV DB_PORT ${DB_PORT:-3306}
ENV DB_DATABASE ${DB_DATABASE:-docker}
ENV DB_USERNAME ${DB_USERNAME:-docker}
ENV DB_PASSWORD ${DB_PASSWORD:-secret}
ENV DB_COLLATION ${DB_COLLATION:-utf8mb4_unicode_ci}
ENV DB_CHARSET ${DB_CHARSET:-utf8mb4}
ENV CACHE_DRIVER ${CACHE_DRIVER:-file}
ENV QUEUE_CONNECTION ${QUEUE_CONNECTION:-sync}
ENV SWOOLE_HTTP_PORT ${SWOOLE_HTTP_PORT:-80}
ENV SWOOLE_HTTP_HOST ${SWOOLE_HTTP_HOST:-"0.0.0.0"}
USER root
ADD ./ /var/www
RUN composer global require hirak/prestissimo && \
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
CMD ["php", "artisan","swoole:http","start"]