-
Notifications
You must be signed in to change notification settings - Fork 0
/
production.Dockerfile
52 lines (45 loc) · 1.18 KB
/
production.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
FROM php:8.3-fpm-bookworm
# install nodejs
RUN set -xe \
&& apt-get update -qq \
&& apt-get install -y -qq curl \
&& curl -sL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get update -qq \
&& apt-get install -y -qq nodejs
# install common packages
RUN set -xe \
&& apt-get install -y -qq \
sudo \
nginx \
procps \
unzip \
libicu-dev \
zlib1g-dev \
libxml2 \
libxml2-dev \
libreadline-dev \
supervisor \
cron \
libzip-dev \
RUN set -xe \
&& docker-php-ext-configure intl \
&& docker-php-ext-install \
sockets \
intl \
opcache \
zip
# install composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN chmod +x /usr/bin/composer
# add supervisor
RUN mkdir -p /var/log/supervisor
COPY --chown=root:root ./docker/production/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY --chown=root:crontab ./docker/production/cron /var/spool/cron/crontabs/root
RUN chmod 0600 /var/spool/cron/crontabs/root
COPY . /srv/iplease
WORKDIR /srv/iplease
# build frontend
RUN set -xe \
&& yarn install \
&& yarn build \
&& rm -rf node_modules