From 93e4a4f1236c0d3d47ec906d9c40ebd1e4c36b79 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Sun, 25 Feb 2018 14:43:23 +0100
Subject: [PATCH] Added FUNWHALE_URL setting to use in activity stream in
 representations

---
 .gitlab-ci.yml                | 2 +-
 api/config/settings/common.py | 2 +-
 api/test.yml                  | 1 +
 deploy/env.prod.sample        | 4 ++++
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0fa450c46c..e4accd722d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,7 +22,7 @@ test_api:
   variables:
     DJANGO_ALLOWED_HOSTS: "localhost"
     DATABASE_URL: "postgresql://postgres@postgres/postgres"
-
+    FUNKWHALE_URL: "https://funkwhale.ci"
   before_script:
     - cd api
     - pip install -r requirements/base.txt
diff --git a/api/config/settings/common.py b/api/config/settings/common.py
index e5389756f4..4c574b4c76 100644
--- a/api/config/settings/common.py
+++ b/api/config/settings/common.py
@@ -25,7 +25,7 @@ except FileNotFoundError:
     pass
 
 ALLOWED_HOSTS = env.list('DJANGO_ALLOWED_HOSTS')
-
+FUNKWHALE_URL = env('FUNKWHALE_URL')
 
 # APP CONFIGURATION
 # ------------------------------------------------------------------------------
diff --git a/api/test.yml b/api/test.yml
index e892dfb178..5e785cb1ac 100644
--- a/api/test.yml
+++ b/api/test.yml
@@ -12,5 +12,6 @@ services:
     environment:
       - "DJANGO_ALLOWED_HOSTS=localhost"
       - "DATABASE_URL=postgresql://postgres@postgres/postgres"
+      - "FUNKWHALE_URL=https://funkwhale.test"
   postgres:
     image: postgres
diff --git a/deploy/env.prod.sample b/deploy/env.prod.sample
index 6a4b15b67c..037dc4651a 100644
--- a/deploy/env.prod.sample
+++ b/deploy/env.prod.sample
@@ -2,6 +2,7 @@
 # following variables:
 # - DJANGO_SECRET_KEY
 # - DJANGO_ALLOWED_HOSTS
+# - FUNKWHALE_URL
 
 # Additionaly, on non-docker setup, you'll also have to tweak/uncomment those
 # variables:
@@ -28,6 +29,9 @@ FUNKWHALE_VERSION=latest
 FUNKWHALE_API_IP=127.0.0.1
 FUNKWHALE_API_PORT=5000
 
+# Replace this by the definitive, public domain you will use for
+# your instance
+FUNKWHALE_URL=https.//yourdomain.funwhale
 
 # API/Django configuration
 
-- 
GitLab