Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions farmos3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the official Drupal 10 image to build GEOS PHP extension.
FROM drupal:10.1 as php-dependencies
FROM drupal:10.1 AS php-dependencies

# Build and install the GEOS PHP extension.
# See https://git.osgeo.org/gitea/geos/php-geos
Expand Down Expand Up @@ -67,7 +67,7 @@ COPY services.yml /opt/drupal/web/sites/default/

# Copy the settings.php file into the container so that the
# default database connection information is set.
copy settings.php /opt/drupal/web/sites/default/
COPY settings.php /opt/drupal/web/sites/default/
RUN chown www-data:www-data /opt/drupal/web/sites/default/settings.php

# Generate the API keys that are needed by FarmData2
Expand Down
2 changes: 1 addition & 1 deletion farmos3/repo.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
farmos3:fd2.1
farmos3:fd2.2
6 changes: 3 additions & 3 deletions farmos3/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
* Be aware, however, that it is likely that this would allow IP
* address spoofing unless more advanced precautions are taken.
*/
# $settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy'] = TRUE;

/**
* Reverse proxy addresses.
Expand All @@ -365,6 +365,7 @@
* $settings['reverse_proxy'] is TRUE.
*/
# $settings['reverse_proxy_addresses'] = ['a.b.c.d', 'e.f.g.h/24', ...];
$settings['reverse_proxy_addresses'] = [$_SERVER['REMOTE_ADDR']];

/**
* Reverse proxy trusted headers.
Expand Down Expand Up @@ -400,8 +401,7 @@
* @see \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED
* @see \Symfony\Component\HttpFoundation\Request::setTrustedProxies
*/
# $settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED;

$settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_HOST | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED;

/**
* Page caching:
Expand Down
7 changes: 7 additions & 0 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# All we want to do here is get the base image
# and push it to the farmdata2 repo on DockerHub.
#
# We build and store our own images so that we can
# upgrade / update in a fully controlled way.

FROM nginx:stable-alpine3.23
1 change: 1 addition & 0 deletions nginx/repo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nginx:fd2.1