diff --git a/README.md b/README.md index 5958fdc..d98acdc 100644 --- a/README.md +++ b/README.md @@ -81,5 +81,6 @@ Not every stack is tested to fully work. | Tor OBFS4 Bridge | ✅ | `thetorproject/obfs4-bridge` | Tor OBFS4 Bridge for Tor blocking bypass. | [Website](https://community.torproject.org/relay/setup/bridge/), [Gitlab](https://gitlab.torproject.org/tpo/anti-censorship/docker-obfs4-bridge), [Manual](https://community.torproject.org/relay/setup/bridge/docker/) | | Tor Privoxy | ✅ | `registry.gitlab.com/skobkin/torproxy-obfs4` | Tor image with integrated privoxy and OBFS4 bridge support. | [Original image Github](https://github.com/dperson/torproxy), [OBFS4 support image Gitlab](https://gitlab.com/skobkin/torproxy-obfs4) | | Watchtower | ✅ | `containrrr/watchtower` | Docker container auto-update daemon. | [Website](https://containrrr.dev/watchtower/), [Github](https://github.com/containrrr/watchtower) | +| Webhook.site | | `webhooksite/webhook.site` | HTTP callback testing tool | [Website](https://webhook.site), [Github](https://github.com/webhooksite/webhook.site) | | Wireguard | ❌ Unfinished | `cmulk/wireguard-docker` | WireGuard VPN. | [Website](https://www.wireguard.com), [Image Github](https://github.com/cmulk/wireguard-docker) | | ~~Wordpress~~ | ❌ Unfinished | `wordpress` | Wordpress blogging platform. | [Webiste](https://wordpress.org), [SVN](https://build.trac.wordpress.org/browser) | diff --git a/redis/.env.dist b/redis/.env.dist index a4a2e70..5a5f99a 100644 --- a/redis/.env.dist +++ b/redis/.env.dist @@ -1,7 +1,11 @@ # https://hub.docker.com/_/redis # Uncomment to use directory binding instead of docker volume (almost always not needed) -#DATA_PATH=/some/path +HOST_DATA_DIR=./data +# https://redis.io/docs/management/persistence/#snapshotting +PERSISTENCE_PERIOD_SEC=60 +PERSISTENCE_MIN_OPS=1 +LOG_LEVEL=warning LOG_MAX_SIZE=5m LOG_MAX_FILE=5 diff --git a/redis/data/.gitignore b/redis/data/.gitignore new file mode 100644 index 0000000..a68d087 --- /dev/null +++ b/redis/data/.gitignore @@ -0,0 +1,2 @@ +/* +!/.gitignore diff --git a/redis/docker-compose.yml b/redis/docker-compose.yml index 646a8ce..22f0bdf 100644 --- a/redis/docker-compose.yml +++ b/redis/docker-compose.yml @@ -1,10 +1,13 @@ -version: '3.7' +version: '3.8' services: redis: # https://hub.docker.com/_/redis image: redis:alpine container_name: redis + command: "redis-server --save ${PERSISTENCE_PERIOD_SEC:-60} ${PERSISTENCE_MIN_OPS:-1} --loglevel ${LOG_LEVEL:-warning}" + volumes: + - "${HOST_DATA_DIR:-./data}:/data" ports: - "127.0.0.1:6379:6379/tcp" env_file: .env @@ -14,7 +17,3 @@ services: options: max-size: "${LOG_MAX_SIZE:-5m}" max-file: "${LOG_MAX_FILE:-5}" - -#volumes: -# redis_data: -# name: redis_data diff --git a/webhooksite/.env.dist b/webhooksite/.env.dist new file mode 100644 index 0000000..492f07c --- /dev/null +++ b/webhooksite/.env.dist @@ -0,0 +1,27 @@ +# see https://hub.docker.com/r/webhooksite/webhook.site +# see https://github.com/webhooksite/webhook.site/blob/master/docker-compose.yml + +WEBUI_BIND_ADDR=127.0.0.1 +WEBUI_BIND_PORT=8391 + +ECHO_BIND_ADDR=0.0.0.0 +# Do not change unless you'll also change it in Nginx config +ECHO_BIND_PORT=6001 + +APP_ENV=prod +APP_DEBUG=false +APP_URL=http://domain.tld:80 +APP_LOG=errorlog +DB_CONNECTION=sqlite +REDIS_HOST=redis +REDIS_PORT=6379 +#REDIS_PASSWORD=null +BROADCAST_DRIVER=redis +CACHE_DRIVER=redis +QUEUE_DRIVER=redis +ECHO_HOST_MODE=path + +REDIS_HOST_DATA_DIR=./data + +LOG_MAX_SIZE=5m +LOG_MAX_FILE=5 \ No newline at end of file diff --git a/webhooksite/data/.gitignore b/webhooksite/data/.gitignore new file mode 100644 index 0000000..a68d087 --- /dev/null +++ b/webhooksite/data/.gitignore @@ -0,0 +1,2 @@ +/* +!/.gitignore diff --git a/webhooksite/docker-compose.yml b/webhooksite/docker-compose.yml new file mode 100644 index 0000000..b8d1d67 --- /dev/null +++ b/webhooksite/docker-compose.yml @@ -0,0 +1,48 @@ +# https://hub.docker.com/r/webhooksite/webhook.site +version: '3.8' + +services: + webhook: + image: "webhooksite/webhook.site" + container_name: webhook-site + command: "php artisan queue:work --daemon --tries=3 --timeout=10" + ports: + - "${WEBUI_BIND_ADDR}:${WEBUI_BIND_PORT}:80" + env_file: .env + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "${LOG_MAX_SIZE:-5m}" + max-file: "${LOG_MAX_FILE:-5}" + + laravel-echo-server: + image: "webhooksite/laravel-echo-server" + depends_on: + - redis + ports: + - "${ECHO_BIND_ADDR:-127.0.0.1}:${ECHO_BIND_PORT:-6001}:${ECHO_BIND_PORT:-6001}" + environment: + - "LARAVEL_ECHO_SERVER_AUTH_HOST=http://webhook" + - "LARAVEL_ECHO_SERVER_HOST=${ECHO_BIND_ADDR:-0.0.0.0}" + - "LARAVEL_ECHO_SERVER_PORT=${ECHO_BIND_PORT:-6001}" + - "ECHO_REDIS_PORT=${REDIS_PORT:-6379}" + - "ECHO_REDIS_HOSTNAME=${REDIS_HOST:-redis}" + - "ECHO_PROTOCOL=http" + - "ECHO_ALLOW_CORS=true" + - "ECHO_ALLOW_ORIGIN=*" + - "ECHO_ALLOW_METHODS=*" + - "ECHO_ALLOW_HEADERS=*" + + redis: + image: redis:alpine + command: "redis-server --save ${PERSISTENCE_PERIOD_SEC:-60} ${PERSISTENCE_MIN_OPS:-1} --loglevel ${LOG_LEVEL:-warning}" + volumes: + - "${REDIS_HOST_DATA_DIR:-./data}:/data" + env_file: .env + restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "${LOG_MAX_SIZE:-5m}" + max-file: "${LOG_MAX_FILE:-5}" diff --git a/webhooksite/nginx/webhook.conf b/webhooksite/nginx/webhook.conf new file mode 100644 index 0000000..c3394af --- /dev/null +++ b/webhooksite/nginx/webhook.conf @@ -0,0 +1,28 @@ +server { + listen 80; + server_name webhook.domain.tld; + + #charset utf-8; + + location / { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_read_timeout 600s; + proxy_send_timeout 600s; + + proxy_pass http://127.0.0.1:8391/; + } + + # https://docs.webhook.site/install.html#docker + location /socket.io { + proxy_pass http://127.0.0.1:6001; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } +} \ No newline at end of file