Skip to content

Commit 34ddbee

Browse files
committed
Wire LOGIN_INTERNAL_API_KEY env var into backend deploy
1 parent 74aec37 commit 34ddbee

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ OSM_REDIRECT_URI=https://dev.login.hotosm.org/api/auth/osm/callback
1818
OSM_URL=https://www.openstreetmap.org
1919
OSM_SCOPE=read_prefs
2020

21+
# ==========================================
22+
# Internal service-to-service shared secret
23+
# Used by consumer projects (fAIr, drone-tm, OAM) to resolve PATs
24+
# Same value must be set on each consumer project
25+
# ==========================================
26+
LOGIN_INTERNAL_API_KEY=
27+
2128
# ==========================================
2229
# SMTP Configuration (for email verification)
2330
# ==========================================

.github/workflows/deploy-dev.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ jobs:
171171
sed -i 's|^OSM_CLIENT_ID=.*|OSM_CLIENT_ID=${{ secrets.OSM_CLIENT_ID }}|' .env
172172
sed -i 's|^OSM_CLIENT_SECRET=.*|OSM_CLIENT_SECRET=${{ secrets.OSM_CLIENT_SECRET }}|' .env
173173
sed -i 's|^OSM_REDIRECT_URI=.*|OSM_REDIRECT_URI=${{ secrets.OSM_REDIRECT_URI }}|' .env
174+
if grep -q '^LOGIN_INTERNAL_API_KEY=' .env; then
175+
sed -i 's|^LOGIN_INTERNAL_API_KEY=.*|LOGIN_INTERNAL_API_KEY=${{ secrets.LOGIN_INTERNAL_API_KEY }}|' .env
176+
else
177+
echo 'LOGIN_INTERNAL_API_KEY=${{ secrets.LOGIN_INTERNAL_API_KEY }}' >> .env
178+
fi
174179
echo "✓ Updated secrets in .env"
175180
176181
# Login to GitHub Container Registry

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ services:
155155
- OSM_URL=${OSM_URL:-https://www.openstreetmap.org}
156156
- OSM_SCOPE=${OSM_SCOPE:-read_prefs}
157157
- LOG_LEVEL=INFO
158+
- LOGIN_INTERNAL_API_KEY=${LOGIN_INTERNAL_API_KEY}
158159
- ADMIN_EMAILS=hernangigena@gmail.com,justina@animus.com.ar,andreatchirillano@hotmail.com,emilio.mariscal@hotosm.org,dakota.benjamin@hotosm.org,sam.woodcock@hotosm.org
159160
# App URLs for admin proxy (public URLs, not internal Docker)
160161
- DRONETM_BACKEND_URL=https://dev.drone.hotosm.org

0 commit comments

Comments
 (0)