Add logs to nodeapp

This commit is contained in:
Reckless_Satoshi 2023-05-12 05:18:48 -07:00
parent 6c20ce4f70
commit 71820cee91
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 26 additions and 3 deletions

View File

@ -1,8 +1,14 @@
FROM alpine:3.18.0
LABEL maintainer="Reckless_Satoshi https://github.com/reckless-satoshi"
RUN mkdir -p /usr/src/robosats
WORKDIR /usr/src/robosats
RUN set -x \
&& addgroup -g 101 -S nginx \
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx
COPY . .
COPY ./nginx.conf /etc/nginx/nginx.conf

View File

@ -1,11 +1,30 @@
daemon off;
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout main;
error_log /dev/stderr warn;
sendfile on;
keepalive_timeout 65;
# Every robosat coordinators socat tor bridge is an upstream.
# So far only the experimental coordinator is available.
upstream experimental_coordinator {
@ -17,8 +36,6 @@ http {
listen 12596;
server_name robosats_client;
include /etc/nginx/mime.types;
location / {
root /usr/src/robosats;
try_files $uri $uri/ /basic.html;

View File

@ -10,4 +10,4 @@
experimental_onion=robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion
experimental_socat="socat tcp4-LISTEN:81,reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${TOR_PROXY_IP:-127.0.0.1}:${experimental_onion}:80,socksport=${TOR_PROXY_PORT:-9050}"
$experimental_socat & nginx -g "daemon off;"
$experimental_socat & nginx