Skip to content

Commit

Permalink
Add differentiation between test mode and production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis960 committed Sep 2, 2024
1 parent c16b4ac commit 1b5bf1d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Blumy-Server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ services:

- ORIGIN=${ORIGIN:?ORIGIN not set. Set it to the URL of the server (e.g. http://localhost:3000 for dev).}
- PORT=3000
- PUBLIC_MODE=${PUBLIC_MODE:-production}
5 changes: 4 additions & 1 deletion Blumy-Server/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { onMount } from 'svelte';
// @ts-expect-error no declaration file
import { pwaInfo } from 'virtual:pwa-info';
import { PUBLIC_MODE } from '$env/static/public';
onMount(async () => {
// @ts-expect-error no declaration file
Expand Down Expand Up @@ -34,7 +35,9 @@
>
<span class="navbar-toggler-icon" />
</button>
<a class="navbar-brand ms-2 ms-lg-0 me-auto" href={$page.url.origin}>Blumy Dashboard</a>
<a class="navbar-brand ms-2 ms-lg-0 me-auto" href={$page.url.origin}
>Blumy Dashboard{PUBLIC_MODE === 'test' ? ' - Test' : ''}</a
>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ services:
- POSTGRES_HOST=db
- POSTGRES_PORT=5432

- PUBLIC_MODE=test

volumes:
db-data:

0 comments on commit 1b5bf1d

Please sign in to comment.