diff --git a/webhooksite/.env.dist b/webhooksite/.env.dist index 8ba58f8..492f07c 100644 --- a/webhooksite/.env.dist +++ b/webhooksite/.env.dist @@ -13,7 +13,7 @@ APP_DEBUG=false APP_URL=http://domain.tld:80 APP_LOG=errorlog DB_CONNECTION=sqlite -REDIS_HOST=host.docker.internal +REDIS_HOST=redis REDIS_PORT=6379 #REDIS_PASSWORD=null BROADCAST_DRIVER=redis @@ -21,5 +21,7 @@ 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 index 9a929c1..b8d1d67 100644 --- a/webhooksite/docker-compose.yml +++ b/webhooksite/docker-compose.yml @@ -6,8 +6,6 @@ services: image: "webhooksite/webhook.site" container_name: webhook-site command: "php artisan queue:work --daemon --tries=3 --timeout=10" - extra_hosts: - - 'host.docker.internal:host-gateway' ports: - "${WEBUI_BIND_ADDR}:${WEBUI_BIND_PORT}:80" env_file: .env @@ -20,6 +18,8 @@ services: 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: @@ -33,3 +33,16 @@ services: - "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}"