Skip to content

Commit

Permalink
Fixes link to demo buggregator server
Browse files Browse the repository at this point in the history
  • Loading branch information
butschster committed Apr 21, 2024
1 parent ad640ff commit 094b800
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions app/app/src/Github/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
public function __construct(
private \Psr\Http\Client\ClientInterface $client,
CacheStorageProviderInterface $cache,
private int $ttl = 300,
) {
$this->cache = $cache->storage('github');
}
Expand All @@ -34,7 +35,7 @@ public function getStars(string $repository): int
);

$data = \json_decode($response->getBody()->getContents(), true);
$this->cache->set($cacheKey, $data['stargazers_count']);
$this->cache->set($cacheKey, $data['stargazers_count'], $this->ttl);

return $data['stargazers_count'];
}
Expand All @@ -54,7 +55,7 @@ public function getLastVersion(string $repository): string
);

$data = \json_decode($response->getBody()->getContents(), true);
$this->cache->set($cacheKey, $data['tag_name']);
$this->cache->set($cacheKey, $data['tag_name'], $this->ttl);

return $data['tag_name'];
}
Expand Down
9 changes: 3 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ services:
- buggregator-network

buggregator-api:
build:
context: ./
dockerfile: ./.docker/app/Dockerfile
image: ghcr.io/buggregator/buggregator.dev-app:latest
environment:
# TOKENIZER_CACHE_TARGETS: true
APP_ENV: production
Expand Down Expand Up @@ -59,13 +57,12 @@ services:
- buggregator-network

buggregator-spa:
build:
context: ./
dockerfile: ./.docker/spa/Dockerfile
image: ghcr.io/buggregator/buggregator.dev-spa:latest
environment:
NUXT_PUBLIC_API_URL: http:https://buggregator.localhost
NUXT_PUBLIC_WS_URL: ws:https://buggregator.localhost/connection/websocket
NUXT_PUBLIC_EXAMPLES_URL: http:https://buggregator.localhost
NUXT_PUBLIC_BUGGREGATOR_URL: http:https://demo.buggregator.localhost
networks:
- buggregator-network

Expand Down
2 changes: 1 addition & 1 deletion spa/components/v1/Demo/BuggregatorFrame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const app = useAppStore();
<div>
<div class="p-0 sticky top-0 h-screen">
<div class="flex flex-col items-center">
<iframe class="frame" :src="app.buggregator_link" frameborder="0"></iframe>
<iframe class="frame" :src="app.buggregator_url" frameborder="0"></iframe>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions spa/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default defineNuxtConfig({
api_url: process.env.API_URL || 'http:https://api.buggregator.localhost',
ws_url: process.env.WS_URL || 'ws:https://ws.buggregator.localhost/connection/websocket',
examples_url: process.env.EXAMPLES_URL || 'http:https://examples.buggregator.localhost',
buggregator_url: process.env.BUGGREGATOR_URL || 'http:https://demo.buggregator.localhost',
}
},
app: {
Expand Down
4 changes: 3 additions & 1 deletion spa/stores/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { AppState, WsEvent } from "~/config/types";

const config = useRuntimeConfig()

export const useAppStore = defineStore('appStore', {
state: (): AppState => ({
github: {
Expand All @@ -12,7 +14,7 @@ export const useAppStore = defineStore('appStore', {
last_version: ''
}
},
buggregator_link: 'http:https://demo.buggregator.localhost'
buggregator_url: config.public.buggregator_url
}),
actions: {
async fetch(): Promise<void> {
Expand Down

0 comments on commit 094b800

Please sign in to comment.