From 2284b595f9d3d540cfacf862ad3af3d6af393179 Mon Sep 17 00:00:00 2001 From: Joe Hoyle Date: Fri, 20 Mar 2020 12:17:26 +0100 Subject: [PATCH 1/2] Network PHP container to allow access to service hostnames Now PHP uses sockets instead of port 9000 for the Nginx -> PHP connection, we can put PHP on the main proxy network. This means it's then easy to link in the hostnames of our services to the traefik HTTP server. This means we can make requests from PHP to https://project.altis.dev/ as well as https://pinpoint-project.altis.dev/ etc. --- docker/docker-compose.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index b1da1a6c..ea06fcbd 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -19,10 +19,15 @@ x-php: &php - "s3:s3.localhost" external_links: - "proxy:${COMPOSE_PROJECT_NAME:-default}.altis.dev" + - "proxy:pinpoint-${COMPOSE_PROJECT_NAME:-default}.altis.dev" + - "proxy:cognito-${COMPOSE_PROJECT_NAME:-default}.altis.dev" volumes: - "${VOLUME}:/usr/src/app:delegated" - "${PWD}/php.ini:/usr/local/etc/php/conf.d/altis.ini" - socket:/var/run/php-fpm + networks: + - proxy + - default environment: HOST_PATH: ${VOLUME} DB_HOST: db @@ -85,8 +90,6 @@ services: php: <<: *php image: ${PHP_IMAGE:-humanmade/altis-local-server-php:3.1.0} - ports: - - '9000' nginx: image: humanmade/altis-local-server-nginx:3.1.0 networks: From 639e194674b09a92909fd31eb9d26c29c53a0f04 Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Fri, 20 Mar 2020 15:12:51 +0000 Subject: [PATCH 2/2] add elastic and s3 links --- docker/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index ea06fcbd..96b7bcc8 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -21,6 +21,8 @@ x-php: &php - "proxy:${COMPOSE_PROJECT_NAME:-default}.altis.dev" - "proxy:pinpoint-${COMPOSE_PROJECT_NAME:-default}.altis.dev" - "proxy:cognito-${COMPOSE_PROJECT_NAME:-default}.altis.dev" + - "proxy:elasticsearch-${COMPOSE_PROJECT_NAME:-default}.altis.dev" + - "proxy:s3-${COMPOSE_PROJECT_NAME:-default}.altis.dev" volumes: - "${VOLUME}:/usr/src/app:delegated" - "${PWD}/php.ini:/usr/local/etc/php/conf.d/altis.ini"