fix: run production server without root
This commit is contained in:
@@ -27,6 +27,9 @@ services:
|
|||||||
|
|
||||||
server:
|
server:
|
||||||
image: "${RVBOX_SERVER_IMAGE:?set RVBOX_SERVER_IMAGE to a pinned rvbox-server image}"
|
image: "${RVBOX_SERVER_IMAGE:?set RVBOX_SERVER_IMAGE to a pinned rvbox-server image}"
|
||||||
|
# The init container is the only root process. Its exact 65532 ownership
|
||||||
|
# setup lets the long-lived server run without host/container root power.
|
||||||
|
user: "65532:65532"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: ["--config", "/etc/rvbox/server.toml"]
|
command: ["--config", "/etc/rvbox/server.toml"]
|
||||||
read_only: true
|
read_only: true
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ func TestProductionComposeAssets_HP_OPS_01(t *testing.T) {
|
|||||||
"RVBOX_SERVER_CONFIG:-./server.toml",
|
"RVBOX_SERVER_CONFIG:-./server.toml",
|
||||||
"RVBOX_HTTPS_BIND:-0.0.0.0",
|
"RVBOX_HTTPS_BIND:-0.0.0.0",
|
||||||
"nginx@sha256:65645c7bb6a0661892a8b03b89d0743208a18dd2f3f17a54ef4b76fb8e2f2a10",
|
"nginx@sha256:65645c7bb6a0661892a8b03b89d0743208a18dd2f3f17a54ef4b76fb8e2f2a10",
|
||||||
|
"user: \"65532:65532\"",
|
||||||
"nofile:", "soft: 65536", "hard: 65536",
|
"nofile:", "soft: 65536", "hard: 65536",
|
||||||
"condition: service_completed_successfully",
|
"condition: service_completed_successfully",
|
||||||
"condition: service_healthy",
|
"condition: service_healthy",
|
||||||
|
|||||||
Reference in New Issue
Block a user