mirror of
https://github.com/sergeyyarkov/astro-directus-example.git
synced 2026-10-11 18:28:59 +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)'
|
- 'CACHE_DATE=$(date +%Y-%m-%d:%H:%M:%S)'
|
||||||
networks:
|
networks:
|
||||||
- directus
|
- directus
|
||||||
ports:
|
|
||||||
- '3000'
|
|
||||||
volumes:
|
volumes:
|
||||||
- './website/nginx/conf.d:/etc/nginx/conf.d:rw'
|
- './website/nginx/conf.d:/etc/nginx/conf.d:rw'
|
||||||
env_file:
|
env_file:
|
||||||
@ -31,6 +29,8 @@ services:
|
|||||||
- directus
|
- directus
|
||||||
networks:
|
networks:
|
||||||
- directus
|
- directus
|
||||||
|
extra_hosts:
|
||||||
|
- 'host.docker.internal:host-gateway'
|
||||||
|
|
||||||
database:
|
database:
|
||||||
image: postgres:15-alpine
|
image: postgres:15-alpine
|
||||||
@ -42,14 +42,14 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- db-data:/var/lib/postgresql/data
|
- db-data:/var/lib/postgresql/data
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432
|
||||||
networks:
|
networks:
|
||||||
- directus
|
- directus
|
||||||
|
|
||||||
directus:
|
directus:
|
||||||
image: directus/directus:10.0.0
|
image: directus/directus:10.0.0
|
||||||
ports:
|
ports:
|
||||||
- 8055:8055
|
- 8055
|
||||||
volumes:
|
volumes:
|
||||||
- uploads:/directus/uploads
|
- uploads:/directus/uploads
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@ -42,6 +42,18 @@ http {
|
|||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
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 {
|
server {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#!bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
reload_nginx() {
|
reload_nginx() {
|
||||||
docker exec nginx nginx -s reload
|
docker exec nginx nginx -s reload
|
||||||
|
|||||||
@ -1,7 +1,14 @@
|
|||||||
#!bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
say_hello() {
|
say_hello() {
|
||||||
echo "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
|
say_hello
|
||||||
Loading…
x
Reference in New Issue
Block a user