mirror of
https://github.com/sergeyyarkov/astro-directus-example.git
synced 2026-10-11 02:08:57 +03:00
nginx conf for webhook
This commit is contained in:
parent
27a7e67a60
commit
87e3c89e4f
@ -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:
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
reload_nginx() {
|
||||
docker exec nginx nginx -s reload
|
||||
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user