From 0a738c5ee369e0d34d8296da0e0af51e2dc4625b Mon Sep 17 00:00:00 2001 From: Akis Date: Fri, 30 Dec 2022 19:56:51 +0200 Subject: [PATCH] fix docker --- Dockerfile | 4 ++-- compose.yml | 38 +++++++++++++++++---------------- src/routes/Announcements.svelte | 2 -- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Dockerfile b/Dockerfile index 999e95c..687621b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:19-alpine +FROM node:18-alpine WORKDIR /usr/src/app @@ -15,4 +15,4 @@ RUN pnpm build EXPOSE 4173 -CMD [ "pnpm", "preview" ] \ No newline at end of file +CMD [ "pnpm", "preview", "--host" ] \ No newline at end of file diff --git a/compose.yml b/compose.yml index 1284c34..44921b2 100644 --- a/compose.yml +++ b/compose.yml @@ -1,28 +1,30 @@ services: - segfaultapi: - container_name: segfaultapi - #image: realprojectsegfault/segfaultapi - restart: always + website: + container_name: website + #image: realprojectsegfault/website + restart: unless-stopped build: context: . dockerfile: Dockerfile + environment: + AUTH_SECRET: ${AUTH_SECRET} ports: - - 6893:6893 + - 1337:4173 volumes: - ./config:/app/config - segfaultapi-db: - image: mongo - container_name: segfaultapi-db - restart: always - ports: - - 27017:27017 - volumes: - - segfaultapi-db-data:/data/db + website-db: + image: postgres + container_name: website-db environment: - MONGO_INITDB_ROOT_USERNAME: $MONGO_USER - MONGO_INITDB_ROOT_PASSWORD: $MONGO_PASSWORD - MONGO_INITDB_DATABASE: segfaultapi - command: [--auth] + POSTGRES_USER: postgres + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + PGDATA: /data/postgres + POSTGRES_DB: website + volumes: + - website-db-data:/data/postgres + ports: + - "5432:5432" + restart: unless-stopped volumes: - segfaultapi-db-data: \ No newline at end of file + website-db-data: \ No newline at end of file diff --git a/src/routes/Announcements.svelte b/src/routes/Announcements.svelte index 241d6aa..3f745d8 100644 --- a/src/routes/Announcements.svelte +++ b/src/routes/Announcements.svelte @@ -5,8 +5,6 @@ let announcements = data.announcements; - console.log(data); - import dayjs from "dayjs";