-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (41 loc) · 1.21 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
FROM ubuntu:jammy
ARG DEBIAN_FRONTEND=noninteractive
# Update
RUN apt-get update -y
#Install required dependencies
RUN apt-get install -y --no-install-recommends \
php8.1 \
php8.1-mysql \
php-json \
php8.1-gd \
php8.1-zip \
php8.1-imap \
php8.1-mbstring \
php8.1-curl \
php8.1-exif \
php8.1-xml \
php8.1-xmlwriter \
php8.1-posix \
php8.1-zmq \
php8.1-fpm \
nginx \
wget \
unzip \
cron \
libpcre2-8-0 \
supervisor
#Enable PHP modules
RUN phpenmod imap mbstring
#Crontab
RUN crontab -l | { cat; echo "* * * * * cd /var/www/espocrm; /usr/bin/php -f cron.php > /dev/null 2>&1"; } | crontab -
#Delete default nginx configs
RUN rm -rf /etc/nginx/sites-available/*
RUN rm -rf /etc/nginx/sites-enabled/*
#Copy in our nginx config and symlink it
COPY ./espocrm.conf /etc/nginx/sites-available/espocrm.conf
RUN ln -s /etc/nginx/sites-available/espocrm.conf /etc/nginx/sites-enabled/espocrm.conf
#Copy in our script and the supervisord configuration file
COPY ./run.sh /app/run.sh
COPY ./supervisord.conf /app/supervisord.conf
EXPOSE 80
ENTRYPOINT ["sh", "-c", "/app/run.sh"]