From 2bc3d582e94950ff9db2c8e01f43d04d5b324c91 Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.uk>
Date: Mon, 24 May 2021 21:30:55 +0100
Subject: [PATCH] Remove the proxy container [ci skip]

As there's only one domain for this project, using http://localhost will
fine.
---
 docker-compose.yaml                   | 47 ++++++++++++---------------
 web/sites/default/settings.docker.php |  2 +-
 2 files changed, 21 insertions(+), 28 deletions(-)

diff --git a/docker-compose.yaml b/docker-compose.yaml
index 083e726..2b4e81d 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -6,31 +6,6 @@ volumes:
   node_modules:
 
 services:
-  proxy:
-    image: jwilder/nginx-proxy
-    ports:
-      - 80:80
-    volumes:
-      - /var/run/docker.sock:/tmp/docker.sock:ro
-
-  node:
-    image: node:14-alpine
-    working_dir: /node
-    entrypoint: sh
-    volumes:
-      - assets:/node/build
-      - node_modules:/node/node_modules
-      - ./web/themes/custom/opdavies/assets:/node/assets
-      - ./web/themes/custom/opdavies/package-lock.json:/node/package-lock.json
-      - ./web/themes/custom/opdavies/package.json:/node/package.json
-      - ./web/themes/custom/opdavies/postcss.config.js:/node/postcss.config.js
-      - ./web/themes/custom/opdavies/tailwind-colours.js:/node/tailwind-colours.js
-      - ./web/themes/custom/opdavies/tailwind-plugin-focus-visible.js:/node/tailwind-plugin-focus-visible.js
-      - ./web/themes/custom/opdavies/tailwind-safelist-classes.txt:/node/tailwind-safelist-classes.txt
-      - ./web/themes/custom/opdavies/tailwind.config.js:/node/tailwind.config.js
-      - ./web/themes/custom/opdavies/templates:/node/templates
-      - ./web/themes/custom/opdavies/webpack.config.js:/node/webpack.config.js
-
   nginx:
     build:
       dockerfile: tools/docker/Dockerfile
@@ -43,8 +18,8 @@ services:
     depends_on:
       php:
         condition: service_started
-    environment:
-      VIRTUAL_HOST: oliverdavies.localhost
+    ports:
+      - 80:80
 
   php:
     build:
@@ -69,3 +44,21 @@ services:
     healthcheck:
       test: ["CMD-SHELL", "bash", "-c", "echo > /dev/tcp/localhost/3306"]
       interval: 1s
+
+  node:
+    image: node:14-alpine
+    working_dir: /node
+    entrypoint: sh
+    volumes:
+      - assets:/node/build
+      - node_modules:/node/node_modules
+      - ./web/themes/custom/opdavies/assets:/node/assets
+      - ./web/themes/custom/opdavies/package-lock.json:/node/package-lock.json
+      - ./web/themes/custom/opdavies/package.json:/node/package.json
+      - ./web/themes/custom/opdavies/postcss.config.js:/node/postcss.config.js
+      - ./web/themes/custom/opdavies/tailwind-colours.js:/node/tailwind-colours.js
+      - ./web/themes/custom/opdavies/tailwind-plugin-focus-visible.js:/node/tailwind-plugin-focus-visible.js
+      - ./web/themes/custom/opdavies/tailwind-safelist-classes.txt:/node/tailwind-safelist-classes.txt
+      - ./web/themes/custom/opdavies/tailwind.config.js:/node/tailwind.config.js
+      - ./web/themes/custom/opdavies/templates:/node/templates
+      - ./web/themes/custom/opdavies/webpack.config.js:/node/webpack.config.js
diff --git a/web/sites/default/settings.docker.php b/web/sites/default/settings.docker.php
index 3411a35..641e836 100644
--- a/web/sites/default/settings.docker.php
+++ b/web/sites/default/settings.docker.php
@@ -12,5 +12,5 @@ $databases['default']['default'] = [
 ];
 
 $settings['trusted_host_patterns'] = [
-  '^oliverdavies.localhost$',
+  '^localhost$',
 ];