-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (63 loc) · 2.31 KB
/
Dockerfile
File metadata and controls
72 lines (63 loc) · 2.31 KB
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
68
69
70
71
72
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
# upgrade system packages and configure timezone data
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y tzdata apt-utils software-properties-common apt-transport-https build-essential && \
ln -fs /usr/share/zoneinfo/Asia/Kolkata /etc/localtime && \
dpkg-reconfigure tzdata && \
# install all packages
apt-get install -y vim \
zip \
unzip \
p7zip-full \
curl \
s3cmd \
php8.3-fpm \
php8.3-mysqli \
php8.3-curl \
php8.3-cli \
php8.3-mbstring \
php8.3-gd \
php8.3-zip \
php8.3-xml \
poppler-utils \
python3-pip \
imagemagick \
ffmpeg \
net-tools \
nginx \
git \
pdftk \
poppler-utils && \
# setup composer for php
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php && \
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
# setup www-data's home directory
usermod -d /tmp/www-data www-data
# set php configuration values
WORKDIR /var/www
ENV PHP_INI_DIR='/etc/php/8.3/fpm'
RUN sed -i 's/post_max_size = 8M/post_max_size = 1024M/' "${PHP_INI_DIR}/php.ini" && \
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 1024M/' "${PHP_INI_DIR}/php.ini" && \
sed -i 's/memory_limit = 128M/memory_limit = 2048M/' "${PHP_INI_DIR}/php.ini" && \
sed -i "\|include /etc/nginx/sites-enabled/\*;|d" "/etc/nginx/nginx.conf"
## setup tribe
RUN curl -L -o tribe.tar.gz https://github.com/tf-gyro/tribe/archive/refs/tags/v3.1.9.tar.gz && \
tar -xzf tribe.tar.gz -C /var/www --strip-components=1 && \
rm tribe.tar.gz && \
composer u && \
## phpmyadmin
curl https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.tar.gz -o pma.tar.gz && \
mkdir /var/www/phpmyadmin && \
tar -xzf pma.tar.gz -C /var/www/phpmyadmin --strip-components=1 && \
rm pma.tar.gz
## junction
COPY "applications/junction/dist" "junction/dist"
RUN chown -R www-data: uploads/ logs/ && \
service php8.3-fpm restart;
EXPOSE 80
EXPOSE 81
COPY scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
CMD ["/usr/local/bin/docker-entrypoint.sh"]