Skip to content

Commit

Permalink
fix version and redirect, speed build
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan committed May 15, 2024
1 parent 77818a1 commit 881f6c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
11 changes: 7 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ FROM node:21-bookworm-slim as build-stage

WORKDIR /app

ARG PUBLIC_DOC_VERSION
ARG PUBLIC_DOC_BUILD_TIMESTAMP

COPY package*.json .
RUN npm ci
COPY . .
RUN npm install
RUN npm run check
RUN npm run build

FROM nginx:1.25-bookworm as production

ARG PUBLIC_DOC_VERSION_ARG
ARG PUBLIC_DOC_BUILD_TIMESTAMP_ARG
ENV PUBLIC_DOC_VERSION=${PUBLIC_DOC_VERSION_ARG}
ENV PUBLIC_DOC_BUILD_TIMESTAMP=${PUBLIC_DOC_BUILD_TIMESTAMP_ARG}

RUN apt-get update && apt-get install nodejs npm -y
RUN npm install pm2 -g

Expand Down
12 changes: 7 additions & 5 deletions frontend/src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<script lang="ts">
import { redirect } from '@sveltejs/kit'
<script>
import { onMount } from 'svelte';
import { goto } from '$app/navigation';
export function load(): void {
throw redirect(307, '/languages')
}
onMount(() => {
goto('/languages');
});
</script>

0 comments on commit 881f6c8

Please sign in to comment.