From 5d4816180ee7c25c1f85b5c72a29f5eb0fd1b4da Mon Sep 17 00:00:00 2001 From: Vasily Zubarev Date: Fri, 21 Mar 2025 19:40:38 +0100 Subject: [PATCH] ci: PORT=7331, remove vercel --- .env.example | 1 + Dockerfile | 3 ++- README.md | 23 +++-------------------- docker-compose.build.yml | 2 +- docker-compose.selfhosting.yml | 5 ++--- docker-compose.yml | 2 +- package.json | 2 +- 7 files changed, 11 insertions(+), 27 deletions(-) diff --git a/.env.example b/.env.example index 90bb454..2715a2a 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ +PORT=7331 UPLOAD_PATH="./uploads" DATABASE_URL="file:./db.sqlite" PROMPT_ANALYSE_NEW_FILE="You are an accountant and invoice analysis assistant. diff --git a/Dockerfile b/Dockerfile index 666bff5..007e176 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM node:23-slim AS base # Default environment variables +ENV PORT=7331 ENV UPLOAD_PATH=/app/uploads ENV NODE_ENV=production ENV DATABASE_URL=file:/app/data/db.sqlite @@ -57,7 +58,7 @@ RUN chmod +x /usr/local/bin/docker-entrypoint.sh # Create directory for SQLite database and set permissions RUN mkdir -p /app/data -EXPOSE 3000 +EXPOSE 7331 ENTRYPOINT ["docker-entrypoint.sh"] CMD ["npm", "start"] diff --git a/README.md b/README.md index f560b07..2a30406 100644 --- a/README.md +++ b/README.md @@ -105,24 +105,7 @@ Once all documents have been uploaded and analyzed, you can view, filter and exp ## 🛳 Deploying or Self-hosting -TaxHacker can be self-hosted on your own infrastructure for complete control over your data and application environment. If you don't have your own server, you can use Vercel to quickly deploy the app just for yourself. - -### `A` Deploying with Vercel - -Deploy your own instance of TaxHacker with Vercel in just a few clicks: - -1. Prepare your [OpenAI API Key](https://platform.openai.com/settings/organization/api-keys) for the AI features -2. Click the deploy button below -3. Configure your environment variables in the Vercel dashboard -4. (Optional) Connect your custom domain - -
- -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvas3k%2FTaxHacker&project-name=TaxHacker&repository-name=TaxHacker) - -### `B` Deploying with Docker - -For server deployment, we provide a [Docker image](./Dockerfile) and [Docker Compose](./docker-compose.yml) files that makes setting up TaxHacker simple: +TaxHacker can be self-hosted on your own infrastructure for complete control over your data and application environment. We provide a [Docker image](./Dockerfile) and [Docker Compose](./docker-compose.yml) files that makes setting up TaxHacker simple: ```bash curl -O https://raw.githubusercontent.com/vas3k/TaxHacker/main/docker-compose.yml @@ -139,7 +122,7 @@ services: app: image: ghcr.io/vas3k/taxhacker:latest ports: - - "3000:3000" + - "7331:7331" environment: - UPLOAD_PATH=/app/uploads - NODE_ENV=production @@ -193,7 +176,7 @@ npm run seed npm run dev ``` -Visit `http://localhost:3000` to see your local instance of TaxHacker. +Visit `http://localhost:7331` to see your local instance of TaxHacker. For a production build, instead of `npm run dev` use the following commands: diff --git a/docker-compose.build.yml b/docker-compose.build.yml index 084b051..83f55f7 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -4,7 +4,7 @@ services: context: . dockerfile: Dockerfile ports: - - "3000:3000" + - "7331:7331" environment: - UPLOAD_PATH=/app/uploads - NODE_ENV=production diff --git a/docker-compose.selfhosting.yml b/docker-compose.selfhosting.yml index e1768a1..dfc716c 100644 --- a/docker-compose.selfhosting.yml +++ b/docker-compose.selfhosting.yml @@ -18,7 +18,7 @@ services: - "traefik.http.routers.taxhacker.entrypoints=https" - "traefik.http.routers.taxhacker.tls.certresolver=cloudflare" - "traefik.http.routers.taxhacker.rule=Host(`tax.vas3k.cloud`)" - - "traefik.http.services.taxhacker.loadBalancer.server.port=3000" + - "traefik.http.services.taxhacker.loadBalancer.server.port=7331" - "traefik.docker.network=traefik" logging: driver: "local" @@ -45,7 +45,7 @@ services: - "traefik.http.routers.snektax.entrypoints=https" - "traefik.http.routers.snektax.tls.certresolver=cloudflare" - "traefik.http.routers.snektax.rule=Host(`snektax.vas3k.cloud`)" - - "traefik.http.services.snektax.loadBalancer.server.port=3000" + - "traefik.http.services.snektax.loadBalancer.server.port=7331" - "traefik.docker.network=traefik" logging: driver: "local" @@ -56,4 +56,3 @@ services: networks: traefik: external: true - diff --git a/docker-compose.yml b/docker-compose.yml index b0bf5f1..fa9b878 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ services: app: image: ghcr.io/vas3k/taxhacker:latest ports: - - "3000:3000" + - "7331:7331" environment: - UPLOAD_PATH=/app/uploads - NODE_ENV=production diff --git a/package.json b/package.json index 0d8ea11..4113990 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "type": "module", "scripts": { - "dev": "next dev --turbopack", + "dev": "next dev -p 7331 --turbopack", "build": "prisma generate && next build", "start": "prisma migrate deploy && npm run seed && next start", "lint": "next lint",