-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (20 loc) · 804 Bytes
/
Dockerfile
File metadata and controls
28 lines (20 loc) · 804 Bytes
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
FROM thecodingmachine/php:8.0-v4-apache-node14
ENV TEMPLATE_PHP_INI="production"
ENV CRON_USER_1="docker" \
CRON_SCHEDULE_1="* * * * *" \
CRON_COMMAND_1="bin/console app:queue:execute"
ENV STARTUP_COMMAND_1="bin/console cache:clear" \
STARTUP_COMMAND_2="bin/console doctrine:migrations:migrate --no-interaction"
ENV APACHE_DOCUMENT_ROOT="public/"
RUN touch /home/docker/.bashrc && printf '\
HISTFILE=~/bash_history\n\
PROMPT_COMMAND="history -a;history -n"\n\
umask 027\n' >> /home/docker/.bashrc
COPY . /var/www/html/
RUN sudo chown -R docker:docker /var/www/html/
RUN composer install --no-dev --no-interaction --no-progress --classmap-authoritative && \
yarn install && \
yarn prod && \
sudo rm -rf assets docker node_modules tests
VOLUME /var/www/html/
EXPOSE 80