-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (45 loc) · 944 Bytes
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# textovka-api Dockerfile
#
# krustowski <krusty@savla.dev>
FROM nginx:stable-alpine
#
# args / env
#
ARG PHP_VERSION "php8"
ARG APP_ROOT "/var/www/textovka-api"
ARG TZ "Europe/Oslo"
ENV PHP_VERSION ${PHP_VERSION}
ENV APP_ROOT ${APP_ROOT}
ENV TZ ${TZ}
ENV BUILD_FROM_DOCKER 1
#
# runntime tools
#
RUN apk update && \
apk upgrade && \
apk add --no-cache \
curl \
jq \
${PHP_VERSION} \
${PHP_VERSION}-json \
${PHP_VERSION}-fpm \
tzdata
#
# "clone" the repo, and inject nginx and php-fpm configs
#
COPY . ${APP_ROOT}
COPY .docker/99-daemonize-fpm-and-run-nginx.sh /docker-entrypoint.d/99-daemonize-fpm-and-run-nginx.sh
COPY .docker/php-fpm.d_www.conf /etc/${PHP_VERSION}/php-fpm.d/www.conf
#
# run runtime tests
#
RUN nginx -t && \
php-fpm8 -t && \
ln -sf /dev/stdout ${APP_ROOT}/game.log
#
# final batch
#
USER ${DOCKER_USER}
WORKDIR ${APP_ROOT}
EXPOSE ${DOCKER_EXPOSE_PORT}
#ENTRYPOINT ["/entrypoint.sh"]