Skip to content

Commit

Permalink
Setup BE Glitchtip key in env files
Browse files Browse the repository at this point in the history
  • Loading branch information
rogup committed Nov 23, 2024
1 parent e055154 commit c339750
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion apps/front-end/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
VITE_API_URL=replace-me
VITE_GLITCHTIP_KEY=dont-use-on-development
VITE_MAPTILER_API_KEY=replace-me
6 changes: 4 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ set -vx
# - PROXY_PORT: the port number being proxied (e.g. '4000')
# - PROXY_PATH: the path being proxied (e.g. '/api')
# - BASE_URL_PATH # not actually used but might be in future?
# - GLITCHTIP_KEY
# - FE_GLITCHTIP_KEY
# - BE_GLITCHTIP_KEY
# - MAPTILER_API_KEY
# - DBUS_SESSION_BUS_ADDRESS: required for service management
# - FIXME the user can write to DEPLOY_DEST, WWW_ROOT
Expand Down Expand Up @@ -84,7 +85,7 @@ cp .tool-versions "$DEPLOY_DEST"
# FIXME these shouldn't be hardwired!
cat >>.env <<EOF
VITE_API_URL=/api
VITE_GLITCHTIP_KEY=${GLITCHTIP_KEY:?}
VITE_GLITCHTIP_KEY=${FE_GLITCHTIP_KEY:?}
VITE_MAPTILER_API_KEY=${MAPTILER_API_KEY:?}
EOF

Expand All @@ -105,6 +106,7 @@ EOF
cat >>"$BE_DEST/.env" <<EOF
SERVER_DATA_ROOT=$DATA_DEST
FASTIFY_PORT=$PROXY_PORT
GLITCHTIP_KEY=${BE_GLITCHTIP_KEY:?}
# root address?
EOF

Expand Down
3 changes: 2 additions & 1 deletion docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ values redacted:
export PROXY_PORT=1$UID
export PROXY_PATH=/api
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/bus
export GLITCHTIP_KEY=*REDACTED*
export FE_GLITCHTIP_KEY=*REDACTED*
export BE_GLITCHTIP_KEY=*REDACTED*
export MAPTILER_API_KEY=*REDACTED*

*Note: paths here should be absolute - relative paths will not work in
Expand Down

0 comments on commit c339750

Please sign in to comment.