This repository has been archived by the owner on May 7, 2022. It is now read-only.
forked from ajanvier/docker-polr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (50 loc) · 1.84 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Forked from TrafeX/docker-php-nginx (https://github.com/TrafeX/docker-php-nginx/)
FROM alpine:latest
LABEL Maintainer="Michael Jo <[email protected]>" \
Description="WSBC Docker image for Polr."
# Environment variables
ENV APP_NAME WorkSafeBC
ENV APP_PROTOCOL https://
ENV DB_PORT 3306
ENV DB_DATABASE polr
ENV DB_USERNAME mjtoolbox@polrdb
ENV POLR_BASE 62
# Install packages
RUN apk --no-cache add gettext git php7 php7-fpm php7-pdo php7-mysqli php7-json php7-openssl php7-curl \
php7-zlib php7-xml php7-phar php7-intl php7-dom php7-xmlreader php7-ctype \
php7-mbstring php7-gd php7-xmlwriter php7-tokenizer php7-pdo_mysql php7-memcached nginx supervisor curl bash
# Configure nginx
COPY config/nginx.conf /etc/nginx/nginx.conf
# Configure PHP-FPM
COPY config/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf
COPY config/php.ini /etc/php7/conf.d/zzz_custom.ini
# Configure supervisord
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Copy start.sh script
COPY start.sh /start.sh
RUN chmod u+x /start.sh
# Copy wait-for-it.sh
COPY wait-for-it.sh /wait-for-it.sh
RUN chmod u+x /wait-for-it.sh
# Install composer
RUN curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer
# Pull application
RUN mkdir -p /src && \
git clone https://github.com/mjtoolbox/polr.git /src
WORKDIR /src
# Install dependencies
RUN composer install --no-dev -o
# Setting logs permissions
RUN mkdir -p storage/logs && \
touch storage/logs/lumen.log && \
chmod -R go+w storage
# Copy env file and setup values
COPY config/.env_polr .env_polr
# Copy admin seeder
COPY seeders/AdminSeeder.php AdminSeeder_withoutEnv.php
# Removing now useless dependency
RUN apk del git
EXPOSE 80
#ENTRYPOINT /wait-for-it.sh $DB_HOST:$DB_PORT --strict --timeout=10 -- /start.sh
ENTRYPOINT /start.sh