From 6b5f9a78cf3c2f5f7fe93a6c8df3d38752f40bcd Mon Sep 17 00:00:00 2001 From: brooke Date: Fri, 25 Apr 2025 14:12:45 -0400 Subject: [PATCH] include config with proper trusted-proxies setting --- abra.sh | 3 ++- compose.yml | 6 ++++++ config.yaml | 24 ++++++++++++++++++++++++ entrypoint.sh.tmpl | 2 +- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 config.yaml diff --git a/abra.sh b/abra.sh index 33db106..9abba17 100644 --- a/abra.sh +++ b/abra.sh @@ -1,2 +1,3 @@ export ENTRYPOINT_VERSION=v1 -export PG_BACKUP_VERSION=v1 \ No newline at end of file +export PG_BACKUP_VERSION=v1 +export CONFIG_VERSION=v1 \ No newline at end of file diff --git a/compose.yml b/compose.yml index 59eaf70..7fcc3ca 100644 --- a/compose.yml +++ b/compose.yml @@ -7,6 +7,8 @@ services: - source: entrypoint target: /custom-entrypoint.sh mode: 0555 + - source: config + target: /config.yaml entrypoint: /custom-entrypoint.sh environment: - GTS_HOST=${DOMAIN} @@ -48,4 +50,8 @@ configs: entrypoint: name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION} file: entrypoint.sh.tmpl + template_driver: golang + config: + name: ${STACK_NAME}_config_${CONFIG_VERSION} + file: config.yaml.tmpl template_driver: golang \ No newline at end of file diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..c10d1dd --- /dev/null +++ b/config.yaml @@ -0,0 +1,24 @@ +# GoToSocial +# Copyright (C) GoToSocial Authors admin@gotosocial.org +# SPDX-License-Identifier: AGPL-3.0-or-later +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +########################### +##### GENERAL CONFIG ###### +########################### +protocol: "https" +bind-address: "0.0.0.0" +port: 8080 +trusted-proxies: [172.16.0.0/12, 10.0.0.0/8] diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index b05bde0..04749d3 100644 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -18,4 +18,4 @@ else echo "DB password secret not found, skipping." fi -/gotosocial/gotosocial server start \ No newline at end of file +/gotosocial/gotosocial --config-path /config.yaml server start \ No newline at end of file