diff --git a/compose.yml b/compose.yml index 4ede0a5..3d9359d 100644 --- a/compose.yml +++ b/compose.yml @@ -11,8 +11,6 @@ services: - 'CACHE_DATE=$(date +%Y-%m-%d:%H:%M:%S)' networks: - directus - ports: - - '3000' volumes: - './website/nginx/conf.d:/etc/nginx/conf.d:rw' env_file: @@ -31,6 +29,8 @@ services: - directus networks: - directus + extra_hosts: + - 'host.docker.internal:host-gateway' database: image: postgres:15-alpine @@ -42,14 +42,14 @@ services: volumes: - db-data:/var/lib/postgresql/data ports: - - 5432:5432 + - 5432 networks: - directus directus: image: directus/directus:10.0.0 ports: - - 8055:8055 + - 8055 volumes: - uploads:/directus/uploads depends_on: diff --git a/nginx/nginx.conf b/nginx/nginx.conf index a9728d7..b363bf4 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -42,6 +42,18 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } + + location /webhooks { + rewrite ^/webhooks/(.*)$ /$1 break; + proxy_pass http://host.docker.internal:8080; + proxy_http_version 1.1; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; + proxy_set_header Host $http_host; + proxy_redirect off; + proxy_buffering off; + chunked_transfer_encoding off; + } } server { diff --git a/scripts/deploy-web.sh b/scripts/deploy-web.sh index 99d21ff..660c1db 100755 --- a/scripts/deploy-web.sh +++ b/scripts/deploy-web.sh @@ -1,4 +1,4 @@ -#!bin/bash +#!/bin/sh reload_nginx() { docker exec nginx nginx -s reload diff --git a/scripts/hello.sh b/scripts/hello.sh index 72cfc9d..49b5ed0 100755 --- a/scripts/hello.sh +++ b/scripts/hello.sh @@ -1,7 +1,14 @@ -#!bin/bash +#!/bin/sh say_hello() { echo "Hello!" } +# docker compose build --build-arg CACHE_DATE=$(date +%Y-%m-%d:%H:%M:%S) --progress=plain web +say_hello +sleep 1 +say_hello +sleep 1 +say_hello +sleep 1 say_hello \ No newline at end of file