Skip to content

Commit

Permalink
feat(server) fix rootless script to generate right docker compose file
Browse files Browse the repository at this point in the history
  • Loading branch information
Friend-LGA committed Feb 19, 2023
1 parent b0639d3 commit 8b59c09
Showing 1 changed file with 18 additions and 23 deletions.
41 changes: 18 additions & 23 deletions src/server_manager/install_scripts/install_server_rootless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,29 +292,24 @@ function write_config() {
}

function start_shadowbox() {
echo "
---
version: '3.6'
services:
shadowbox:
image: '${SB_IMAGE}'
container_name: '${CONTAINER_NAME}'
restart: always
net: host
environment:
SB_STATE_DIR: '${STATE_DIR}'
SB_API_PORT: '${API_PORT}'
SB_API_PREFIX: '${SB_API_PREFIX}'
SB_CERTIFICATE_FILE: '${SB_CERTIFICATE_FILE}'
SB_PRIVATE_KEY_FILE: '${SB_PRIVATE_KEY_FILE}'
SB_METRICS_URL: '${SB_METRICS_URL:-}'
SB_DEFAULT_SERVER_NAME: '${SB_DEFAULT_SERVER_NAME:-}'
volumes:
- '${STATE_DIR}:${STATE_DIR}'
ports:
- '${FLAGS_API_PORT}:${FLAGS_API_PORT}/tcp'
- '${FLAGS_KEYS_PORT}:${FLAGS_KEYS_PORT}/tcp'
- '${FLAGS_KEYS_PORT}:${FLAGS_KEYS_PORT}/udp'
echo "---
version: '3.6'
services:
shadowbox:
image: '${SB_IMAGE}'
container_name: '${CONTAINER_NAME}'
restart: always
network_mode: host
environment:
SB_STATE_DIR: '${STATE_DIR}'
SB_API_PORT: '${API_PORT}'
SB_API_PREFIX: '${SB_API_PREFIX}'
SB_CERTIFICATE_FILE: '${SB_CERTIFICATE_FILE}'
SB_PRIVATE_KEY_FILE: '${SB_PRIVATE_KEY_FILE}'
SB_METRICS_URL: '${SB_METRICS_URL:-}'
SB_DEFAULT_SERVER_NAME: '${SB_DEFAULT_SERVER_NAME:-}'
volumes:
- '${STATE_DIR}:${STATE_DIR}'
" > ./docker-compose.yml
# By itself, local messes up the return code.
local STDERR_OUTPUT
Expand Down

0 comments on commit 8b59c09

Please sign in to comment.