From 39c372d1ffcf72c6e5bb91172bf3127ceb444aa8 Mon Sep 17 00:00:00 2001 From: Kerem Kazan Date: Tue, 17 Sep 2024 14:57:36 -0400 Subject: [PATCH] remove supervisord (#1088) --- core/Dockerfile | 6 +----- core/docker/archive_node.supervisord.conf | 18 ------------------ core/docker/docker-compose.yml | 2 -- core/docker/full_node.supervisord.conf | 18 ------------------ core/docker/run.sh | 4 ++-- 5 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 core/docker/archive_node.supervisord.conf delete mode 100644 core/docker/full_node.supervisord.conf diff --git a/core/Dockerfile b/core/Dockerfile index 8d4b1b2bc..01708e1ac 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -30,12 +30,10 @@ LABEL org.opencontainers.image.title="River Node" \ org.opencontainers.image.licenses="MIT" # Install dependencies -RUN apk add --no-cache libcap supervisor curl && \ +RUN apk add --no-cache libcap curl && \ adduser -D riveruser COPY docker/run.sh /etc/run.sh -COPY docker/full_node.supervisord.conf /etc/full_node.supervisord.conf -COPY docker/archive_node.supervisord.conf /etc/archive_node.supervisord.conf COPY --from=builder /bin/river_node /usr/bin/river_node # Use setcap to allow the web server binary to bind to privileged ports @@ -44,9 +42,7 @@ RUN setcap 'cap_net_bind_service=+ep' /usr/bin/river_node COPY --from=builder /build/node/default_config.yaml /riveruser/river_node/config/config.yaml RUN mkdir -p /riveruser/river_node/logs -RUN mkdir -p /riveruser/supervisord/logs RUN chown riveruser:riveruser /riveruser/river_node/logs -RUN chown riveruser:riveruser /riveruser/supervisord/logs # Set non-root user USER riveruser diff --git a/core/docker/archive_node.supervisord.conf b/core/docker/archive_node.supervisord.conf deleted file mode 100644 index 077d42aa9..000000000 --- a/core/docker/archive_node.supervisord.conf +++ /dev/null @@ -1,18 +0,0 @@ -[supervisord] -logfile=/riveruser/supervisord/logs/supervisord.log ; (main log file;default $CWD/supervisord.log) -pidfile=/riveruser/supervisord/logs/supervisord.pid -nodaemon=true -loglevel=info -logfile=/dev/stdout -logfile_maxbytes=0 - -[program:archive_node] -command=/usr/bin/river_node archive -directory=/riveruser/river_node -autostart=true -autorestart=false -user=riveruser -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 \ No newline at end of file diff --git a/core/docker/docker-compose.yml b/core/docker/docker-compose.yml index f5befc865..34c8fb5d8 100644 --- a/core/docker/docker-compose.yml +++ b/core/docker/docker-compose.yml @@ -3,8 +3,6 @@ services: # image: public.ecr.aws/h5v6m2x1/river:latest build: dockerfile: ../Dockerfile - volumes: - - ./local_river_node_logs:/riveruser/river_node/logs environment: - BASECHAIN__CHAINID=31337 - STORAGE_TYPE=postgres diff --git a/core/docker/full_node.supervisord.conf b/core/docker/full_node.supervisord.conf deleted file mode 100644 index d17451a2b..000000000 --- a/core/docker/full_node.supervisord.conf +++ /dev/null @@ -1,18 +0,0 @@ -[supervisord] -logfile=/riveruser/supervisord/logs/supervisord.log ; (main log file;default $CWD/supervisord.log) -pidfile=/riveruser/supervisord/logs/supervisord.pid -nodaemon=true -loglevel=info -logfile=/dev/stdout -logfile_maxbytes=0 - -[program:river_node] -command=/usr/bin/river_node run -directory=/riveruser/river_node -autostart=true -autorestart=false -user=riveruser -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 diff --git a/core/docker/run.sh b/core/docker/run.sh index d8e31bd7d..be41076ca 100755 --- a/core/docker/run.sh +++ b/core/docker/run.sh @@ -8,10 +8,10 @@ fi if [ "$RUN_MODE" == "full" ]; then echo "Running full node" - exec /usr/bin/supervisord -c /etc/full_node.supervisord.conf + exec /usr/bin/river_node run elif [ "$RUN_MODE" == "archive" ]; then echo "Running archive node" - exec /usr/bin/supervisord -c /etc/archive_node.supervisord.conf + exec /usr/bin/river_node archive else echo "Unknown RUN_MODE: $RUN_MODE" exit 1