diff --git a/Caddyfile b/Caddyfile deleted file mode 100644 index d293f49..0000000 --- a/Caddyfile +++ /dev/null @@ -1,4 +0,0 @@ -http://localhost { - file_server - root * /usr/share/caddy -} diff --git a/Dockerfile b/Dockerfile index 05fccf2..0d9a2b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,15 @@ -FROM cl00e9ment/node.js-builder:light AS build +FROM node:19-alpine -WORKDIR /app +WORKDIR /usr/src/app COPY package.json ./ -COPY pnpm-lock.yaml ./ -RUN pnpm i -COPY . ./ -RUN pnpm build && cp Caddyfile build -FROM caddy:2.5.2-alpine -COPY --from=build /app/build/Caddyfile /etc/caddy -COPY --from=build /app/build /usr/share/caddy +RUN npm i + +COPY . . + +RUN npm run build + EXPOSE 80 + +CMD [ "npm", "run", "preview" ] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5e30726 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3.9" +services: + website: + container_name: website + image: realprojectsegfault/website + restart: always + #build: . + ports: + - "80:80" + volumes: + - "./data:/usr/src/app/data" \ No newline at end of file diff --git a/package.json b/package.json index 9d0b413..0a2b36f 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@iconify-json/fa6-solid": "^1.1.7", "@iconify-json/simple-icons": "^1.1.28", - "@sveltejs/adapter-static": "1.0.0-next.43", + "@sveltejs/adapter-node": "1.0.0-next.43", "@sveltejs/kit": "1.0.0-next.504", "dayjs": "^1.11.5", "mdsvex": "^0.10.6", diff --git a/src/lib/Announcements.svelte b/src/lib/Announcements.svelte deleted file mode 100644 index 4e48d48..0000000 --- a/src/lib/Announcements.svelte +++ /dev/null @@ -1,124 +0,0 @@ - - -{#await fetchState("announcements") then state} - {#if state.enabled === "true"} -
- {#await fetchAnnouncements() then announcements} -
-
-
- {#if announcements.severity === "info"} -
- {:else} -
- {/if} - - {dayjs - .unix(announcements.created) - .format("DD/MM/YYYY HH:mm")} - -
-
- {announcements.title} -
- - {#if announcements.link} - - {/if} -
-
- {/await} -
- - - - {#if announcements.severity === "info"} - - {:else if announcements.severity === "low"} - - {:else if announcements.severity === "medium"} - - {:else if announcements.severity === "high"} - - {/if} - - - {:else} -
-
- Announcements are currently disabled. -
- {/if} -{/await} diff --git a/src/lib/Card/CardInner.svelte b/src/lib/Card/CardInner.svelte index 66f0850..9e0db0b 100644 --- a/src/lib/Card/CardInner.svelte +++ b/src/lib/Card/CardInner.svelte @@ -3,6 +3,7 @@ export let position: any; export let description: any; export let icon: any; + export let positionStyles: any;
@@ -17,7 +18,8 @@ {title} {#if position} - - {position} + - + {position} {/if} diff --git a/src/lib/ContactForm.svelte b/src/lib/ContactForm.svelte deleted file mode 100644 index 4a01bb8..0000000 --- a/src/lib/ContactForm.svelte +++ /dev/null @@ -1,43 +0,0 @@ - - -{#await promise} - -{:then state} - {#if state.enabled === "true"} -
- - - - - - - - -