-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (20 loc) · 1.05 KB
/
Dockerfile
File metadata and controls
38 lines (20 loc) · 1.05 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
FROM php:8.2.4-fpm-alpine
RUN apk update && apk add --no-cache nginx wget postgresql-dev zlib-dev libzip-dev unzip
RUN mkdir -p /run/nginx
RUN docker-php-ext-install pdo_pgsql pgsql zip
COPY docker/nginx.conf /etc/nginx/nginx.conf
RUN mkdir -p /app
COPY . /app
COPY /src /app
RUN sh -c "wget http://getcomposer.org/composer.phar && chmod a+x composer.phar && mv composer.phar /usr/local/bin/composer"
RUN cd /app && \
/usr/local/bin/composer install --no-dev --no-plugins --ignore-platform-req=ext-gd
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini && \
sed -i 's/upload_max_filesize = .*/upload_max_filesize = 128M/g' /usr/local/etc/php/php.ini && \
sed -i 's/post_max_size = .*/post_max_size = 128M/g' /usr/local/etc/php/php.ini && \
sed -i 's/memory_limit = .*/memory_limit = 512M/g' /usr/local/etc/php/php.ini
# Build argument for service account file
ARG GOOGLE_APPLICATION_CREDENTIALS
COPY ${GOOGLE_APPLICATION_CREDENTIALS} /app/service-account.json
RUN chown -R www-data: /app
CMD sh /app/docker/startup.sh