-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
52 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,41 @@ | ||
ARG PHP_VERSION | ||
ARG PHP_SHORT_VERSION | ||
FROM druidfi/drupal-web:php-${PHP_VERSION} as base | ||
FROM druidfi/drupal-web:php-${PHP_VERSION} AS base | ||
|
||
COPY --from=ghcr.io/city-of-helsinki/drupal-oc-cli:latest /usr/bin/oc /usr/bin/oc | ||
|
||
RUN sudo apk add --no-cache jq | ||
RUN sudo apk add --no-cache jq openssl | ||
|
||
RUN sudo composer self-update | ||
|
||
# Autostart drush server and syslog services. | ||
COPY entrypoints/ /entrypoints | ||
|
||
COPY files/ / | ||
|
||
# Override default fpm pool conf to run nginx and php-fpm as same user. | ||
COPY php-fpm-pool.conf /etc/php${PHP_SHORT_VERSION}/php-fpm.d/www.conf | ||
|
||
RUN grep -qxF 'xdebug.log' /etc/php${PHP_SHORT_VERSION}/conf.d/xdebug.ini || echo 'xdebug.log=/tmp/xdebug.log' | sudo tee -a /etc/php${PHP_SHORT_VERSION}/conf.d/xdebug.ini && \ | ||
sudo -u root touch /tmp/xdebug.log && \ | ||
sudo chmod 666 /tmp/xdebug.log | ||
|
||
# Add druid user to nginx group to prevent permission issues with drush and 'asset://' | ||
# files. | ||
RUN sudo addgroup druid nginx | ||
|
||
ENV SIMPLETEST_DB="mysql://${DRUPAL_DB_USER}:${DRUPAL_DB_PASS}@${DRUPAL_DB_HOST}:${DRUPAL_DB_PORT}/${DRUPAL_DB_NAME}" | ||
RUN sudo -u root touch /tmp/xdebug.log && \ | ||
sudo chmod 666 /tmp/xdebug.log | ||
|
||
FROM base as php81 | ||
RUN sudo apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing \ | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/main \ | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/community add php81-pecl-pcov php81-pecl-imagick | ||
RUN sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ | ||
-subj "/C=FI/ST=Uusimaa/L=Helsinki" \ | ||
-keyout /etc/ssl/private/cert.key \ | ||
-out /etc/ssl/certs/cert.crt | ||
|
||
FROM base as php82 | ||
ENV SIMPLETEST_DB="mysql://${DRUPAL_DB_USER}:${DRUPAL_DB_PASS}@${DRUPAL_DB_HOST}:${DRUPAL_DB_PORT}/${DRUPAL_DB_NAME}" | ||
|
||
FROM base AS php83 | ||
RUN sudo apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing \ | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/main \ | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \ | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/releases add php82-pecl-imagick php82-pecl-pcov | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/releases add php83-pecl-imagick php83-pecl-pcov | ||
|
||
FROM base as php83 | ||
FROM base AS php84 | ||
RUN sudo apk --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing \ | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/main \ | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \ | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/releases add php83-pecl-imagick php83-pecl-pcov | ||
--repository=https://dl-cdn.alpinelinux.org/alpine/edge/releases add php84-pecl-imagick php84-pecl-pcov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +0,0 @@ | ||
location ~* \.(css|cur|js|jpe?g|gif|htc|ico|png|xml|otf|ttf|eot|woff|woff2|svg|mp4|svgz|ogg|ogv|pdf|pptx?|zip|tgz|gz|rar|bz2|doc|xls|exe|tar|mid|midi|wav|bmp|rtf|txt|map)$ { | ||
add_header Access-Control-Allow-Origin "*"; | ||
try_files $uri @rewrite; | ||
expires 1y; | ||
add_header Pragma "cache"; | ||
add_header Cache-Control "public"; | ||
log_not_found off; | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
server { | ||
listen 443 ssl; | ||
server_name _; | ||
ssl_certificate /etc/ssl/certs/cert.crt; | ||
ssl_certificate_key /etc/ssl/private/cert.key; | ||
proxy_buffer_size 128k; | ||
proxy_buffers 4 256k; | ||
proxy_busy_buffers_size 256k; | ||
client_max_body_size 32M; | ||
|
||
location / { | ||
proxy_pass http://127.0.0.1:8080; | ||
proxy_redirect off; | ||
proxy_set_header X-Forwarded-Proto https; | ||
proxy_set_header X-Forwarded-Port 443; | ||
proxy_set_header Host app; | ||
} | ||
} |