-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
59 lines (30 loc) · 1.14 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
FROM luizeof/php8.1-build
EXPOSE 80
ENV APP_HOME /var/www/html
ENV COMPOSER_MEMORY_LIMIT=-1
RUN sudo apt-get install apache2-utils -y
RUN sudo apt install dnsutils -y
RUN rm -f /etc/memcached.conf
COPY ./Dockerfile.files/memcached.conf /etc/memcached.conf
RUN mkdir -p /var/run/memcached/
RUN chmod +777 -R /var/run/memcached/
RUN rm -rf /var/www/html
RUN mkdir -p /var/www/html/public
COPY ./Dockerfile.files/scheduler.crontab /etc/cron.d/scheduler
RUN chmod 644 /etc/cron.d/scheduler
WORKDIR /var/www/html/
RUN mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www/.composer
COPY . /var/www/html/
RUN rm -rf /var/www/html/.git
RUN COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist --no-dev --optimize-autoloader --no-interaction --no-progress -o
RUN composer dumpautoload -o
RUN npm install
RUN npm run production
RUN chmod -R 777 /tmp
RUN php artisan storage:link
RUN mkdir -p /var/www/html/storage/logs/
RUN chown -R www-data:www-data /var/www/html
COPY ./Dockerfile.files/entrypoint-web.sh /entrypoint-web.sh
RUN ["chmod", "+x", "/entrypoint-web.sh"]
ENTRYPOINT ["/entrypoint-web.sh"]
CMD ["apache2-foreground"]