diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..afea8717 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:19.8-alpine3.16 + +EXPOSE 3000 +RUN npm i -g pnpm + +WORKDIR /online-energieausweis +COPY ./package.json ./ +RUN pnpm install --prod +COPY . . + +CMD ["pnpm", "run", "build:production"] \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs index 08071ca4..fd949b8c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,19 +1,23 @@ import { defineConfig } from "astro/config"; - import svelte from "@astrojs/svelte"; -// https://astro.build/config import tailwind from "@astrojs/tailwind"; // https://astro.build/config import node from "@astrojs/node"; +// https://astro.build/config +import mdx from "@astrojs/mdx"; + // https://astro.build/config export default defineConfig({ - integrations: [svelte(), tailwind()], + integrations: [svelte(), tailwind(), mdx()], outDir: "./dist", output: "server", adapter: node({ - mode: "standalone" - }) + mode: "middleware" + }), + server: { + port: 3000 + } }); \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..0e9f0a47 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: '3' +services: + online-energieausweis: + build: ./ + container_name: online-energieausweis + command: pnpm run dev --host + links: + - db + environment: + PORT: 3000 + DB_CONNECTION: postgres://user:secure1@db/main + NODE_ENV: "development" + ports: + - 3000:3000 + volumes: + - ./:/online-energieausweis + db: + build: ../database + ports: + - "5436:5432" \ No newline at end of file diff --git a/package.json b/package.json index ee9cc903..4c03ec2a 100644 --- a/package.json +++ b/package.json @@ -10,16 +10,18 @@ "astro": "astro", "test:e2e": "cypress run", "test:unit": "vitest", - "format": "prettier --write ." + "format": "prettier --write .", + "build:production": "astro build && node server.js" }, "private": true, "dependencies": { + "@astrojs/mdx": "^0.18.2", "@astrojs/node": "^5.1.0", "@astrojs/svelte": "^2.0.2", "@astrojs/tailwind": "^3.1.0", "astro": "^2.1.7", - "bcrypt": "^5.1.0", "cookiejs": "^2.1.2", + "express": "^4.18.2", "jwt-simple": "^0.5.6", "knex": "^2.4.2", "moment": "^2.29.4", @@ -31,7 +33,6 @@ "zod": "^3.21.4" }, "devDependencies": { - "@types/bcrypt": "^5.0.0", "@types/uuid": "^9.0.1", "@typescript-eslint/eslint-plugin": "^5.36.1", "@typescript-eslint/parser": "^5.36.1", diff --git a/server.js b/server.js new file mode 100644 index 00000000..04dce09b --- /dev/null +++ b/server.js @@ -0,0 +1,8 @@ +import express from 'express'; +import { handler as ssrHandler } from './dist/server/entry.mjs'; + +const app = express(); +app.use(express.static('dist/client/')) +app.use(ssrHandler); + +app.listen(80); \ No newline at end of file diff --git a/src/components/Ausweis/Hilfe.astro b/src/components/Ausweis/Hilfe.astro new file mode 100644 index 00000000..705b9615 --- /dev/null +++ b/src/components/Ausweis/Hilfe.astro @@ -0,0 +1,26 @@ +
+
+ Gebäudedaten
+Kundendaten
+Kaufabschluss
+{heading}
+
diff --git a/src/components/Reviews/Diagrams.astro b/src/components/Reviews/Diagrams.astro
new file mode 100644
index 00000000..7adc597e
--- /dev/null
+++ b/src/components/Reviews/Diagrams.astro
@@ -0,0 +1,446 @@
+Bedienfreundlichkeit
+Preis/Leistung
+Kundenservice
+powered by
- -
+
+
+
+
+Folgende Punkte ändern sich:
+