From ff4be289fcf970184dcf45d536d803c3ad4e26b7 Mon Sep 17 00:00:00 2001 From: Gurkengewuerz Date: Thu, 26 Oct 2023 01:10:04 +0200 Subject: [PATCH] feat: move imager to assets proxy --- assets/nginx/default.conf | 4 ++++ compose.yaml | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/nginx/default.conf b/assets/nginx/default.conf index 22620e1..fc220e6 100644 --- a/assets/nginx/default.conf +++ b/assets/nginx/default.conf @@ -39,6 +39,10 @@ server { proxy_pass http://imgproxy:8080/; } + location ^~ /api/imager/ { + proxy_pass http://imager:3000/; + } + location ~* (.*/thumbnail)/(.+\.png)$ { # kill cache expires -1; diff --git a/compose.yaml b/compose.yaml index 0ddd415..e3d69cc 100644 --- a/compose.yaml +++ b/compose.yaml @@ -95,12 +95,13 @@ services: imager: build: context: imager + depends_on: + # proxied through nginx of assets + - assets env_file: - .env volumes: - ./assets/:/app/assets/ - ports: - - 3001:3000 restart: unless-stopped networks: [nitro]