Skip to content

Commit

Permalink
fix: fix monolith welcome message (#1413)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
NathanFlurry committed Nov 21, 2024
1 parent bfd14c9 commit 4eedc91
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 40 deletions.
7 changes: 5 additions & 2 deletions docker/monolith/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ ARG VECTOR_VERSION=0.42.0
ARG S6_OVERLAY_VERSION=3.2.0.2

# === Install ===
COPY ./docker/monolith/scripts /tmp/scripts
RUN /tmp/scripts/install.sh
COPY ./docker/monolith/build-scripts /tmp/build-scripts
# Remove the scripts after running since this pulls dependencies for Deno.
RUN /tmp/build-scripts/install.sh && rm -r /tmp/build-scripts

# === Copy Configs ===
COPY ./docker/monolith/run-scripts/ /root/run-scripts

COPY ./docker/monolith/clickhouse/config.xml /etc/clickhouse-server/config.d/config.xml
COPY ./docker/monolith/clickhouse/users.xml /etc/clickhouse-server/users.d/users.xml

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ curl -sSLf https://github.com/just-containers/s6-overlay/releases/download/v${S6
tar -C / -Jxpf /tmp/s6-overlay-$(uname -m).tar.xz

# Setup S6
deno run --allow-read --allow-write /tmp/scripts/setup_s6.ts
deno run --allow-read --allow-write /tmp/build-scripts/setup_s6.ts

# === Rivet Server ===
useradd -m -s /bin/bash rivet-server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env -S deno run --allow-net --allow-env --allow-read --allow-write
#!/usr/bin/env -S deno run --vendor --allow-net --allow-env --allow-read --allow-write

import { resolve } from "@std/path";
import dedent from "dedent";
Expand Down Expand Up @@ -48,15 +48,15 @@ interface Service {
const services: Service[] = [
{
name: "rivet-prestart",
command:
`${scriptsPath}/scripts/prestart.sh`,
command: "/root/run-scripts/prestart.sh",
noRedirectLogs: true,
rootUser: true,
ports: {},
},
{
name: "rivet-poststart",
command:
`${scriptsPath}/scripts/poststart.sh`,
command: "/root/run-scripts/poststart.sh",
noRedirectLogs: true,
dependencies: ["rivet-server"],
rootUser: true,
ports: {},
Expand Down Expand Up @@ -148,6 +148,7 @@ const services: Service[] = [
weed server \
-dir /data/seaweedfs \
-master.port=9402 \
-master.raftBootstrap \
-master.raftHashicorp \
-volume.port 9400 \
-filer.port=9403 \
Expand Down
8 changes: 8 additions & 0 deletions docker/monolith/run-scripts/poststart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
cat << EOF
Rivet started.
EOF

# Sleep for infinity since this service will be restarted if it exits
sleep infinity

25 changes: 25 additions & 0 deletions docker/monolith/run-scripts/prestart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
cat << EOF
Welcome to Rivet
Configuration:
Dashboard: http://127.0.0.1:8080/ui/
API: 127.0.0.1:8080
Edge API: 127.0.0.1:8081
Orchestrator: 127.0.0.1:8082
Object Storage: 127.0.0.1:9000
Resources:
Quickstart: https://rivet.gg/docs/quickstart
Operation: https://rivet.gg/docs/self-hosting
Documentation: https://rivet.gg/docs
Discord: https://rivet.gg/discord
Starting Rivet...
EOF

# Sleep for infinity since this service will be restarted if it exits
sleep infinity

18 changes: 0 additions & 18 deletions docker/monolith/scripts/poststart.sh

This file was deleted.

14 changes: 0 additions & 14 deletions docker/monolith/scripts/prestart.sh

This file was deleted.

1 change: 1 addition & 0 deletions externals/cloudflare-rs
Submodule cloudflare-rs added at f14720
1 change: 1 addition & 0 deletions externals/deno
Submodule deno added at bd9856
1 change: 1 addition & 0 deletions externals/nomad-client
Submodule nomad-client added at abb66b
1 change: 1 addition & 0 deletions externals/posthog-rs
Submodule posthog-rs added at ef4e80
1 change: 1 addition & 0 deletions externals/redis-rs
Submodule redis-rs added at ac3e27
1 change: 1 addition & 0 deletions externals/rivet-term
Submodule rivet-term added at d539a0
1 change: 1 addition & 0 deletions externals/serde_array_query
Submodule serde_array_query added at b9f8bf
1 change: 1 addition & 0 deletions externals/sqlx
Submodule sqlx added at e7120f

0 comments on commit 4eedc91

Please sign in to comment.