diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a44058c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules +dist \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..429a386 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:lts AS runtime +WORKDIR /app + +COPY . . + +ENV ASTRO_DB_REMOTE_URL=libsql + +RUN npm install +RUN npx astro db push --remote +RUN npx astro build --remote + +ENV HOST=0.0.0.0 +ENV PORT=4321 +EXPOSE 4321 +CMD ["node", "./dist/server/entry.mjs"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2a25613 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +services: + memento: + build: . + ports: + - 4321:4321 + + db: + image: postgres:17 + ports: + - 5432:5432 + volumes: + - ./pg:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: test + POSTGRES_USER: memento +