From a259542105e5c588864f1451196c2f5b8af4fb54 Mon Sep 17 00:00:00 2001 From: WebSavva Date: Thu, 21 Aug 2025 23:46:33 +0300 Subject: [PATCH] feat: Node was upgraded as well as domain was changed --- .env.build.example | 4 ++-- .env.e2e | 2 +- .env.e2e.build | 4 ++-- .env.example | 2 +- .github/workflows/cd.yml | 18 +++++++++--------- Dockerfile | 8 ++++---- README.md | 4 ++-- deployment/README.md | 16 ++++++++-------- deployment/deployment-manager.sh | 2 +- deployment/docker-compose.yaml | 2 +- deployment/nginx.conf | 4 ++-- deployment/registry-docker-compose.yaml | 2 +- package.json | 9 ++++++--- 13 files changed, 40 insertions(+), 37 deletions(-) diff --git a/.env.build.example b/.env.build.example index 75f0096..5770351 100644 --- a/.env.build.example +++ b/.env.build.example @@ -12,8 +12,8 @@ NEXT_PUBLIC_SERVER_URL=http://localhost:3000 # Application Info NEXT_PUBLIC_COMPANY_NAME=WebBid -NEXT_PUBLIC_SUPPORT_EMAIL=support@webbid.shop -NEXT_PUBLIC_DOMAIN=webbid.shop +NEXT_PUBLIC_SUPPORT_EMAIL=support@webbid.store +NEXT_PUBLIC_DOMAIN=webbid.store # Payments NEXT_PUBLIC_SERVICE_FEE_PERCENTAGE=5 # percentage value diff --git a/.env.e2e b/.env.e2e index dfa3f45..81c4d40 100644 --- a/.env.e2e +++ b/.env.e2e @@ -1,6 +1,6 @@ # Payload PAYLOAD_SECRET=abcd -PAYLOAD_ADMIN_EMAIL=admin@webbid.shop +PAYLOAD_ADMIN_EMAIL=admin@webbid.store PAYLOAD_ADMIN_PASSWORD=123456QWERTY # Postgres Database diff --git a/.env.e2e.build b/.env.e2e.build index fc22f95..9d2760d 100644 --- a/.env.e2e.build +++ b/.env.e2e.build @@ -12,8 +12,8 @@ NEXT_PUBLIC_SERVER_URL=http://localhost:3000 # Application Info NEXT_PUBLIC_COMPANY_NAME=WebBid -NEXT_PUBLIC_SUPPORT_EMAIL=support@webbid.shop -NEXT_PUBLIC_DOMAIN=webbid.shop +NEXT_PUBLIC_SUPPORT_EMAIL=support@webbid.store +NEXT_PUBLIC_DOMAIN=webbid.store # Payments NEXT_PUBLIC_SERVICE_FEE_PERCENTAGE=5 # percentage value diff --git a/.env.example b/.env.example index e1472e1..480204c 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,6 @@ # Payload PAYLOAD_SECRET=abcd -PAYLOAD_ADMIN_EMAIL=admin@webbid.shop +PAYLOAD_ADMIN_EMAIL=admin@webbid.store PAYLOAD_ADMIN_PASSWORD=123456QWERTY # Postgres Database diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 06c8cf5..689e7bc 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -58,7 +58,7 @@ jobs: - name: Login to custom Docker registry uses: docker/login-action@v3 with: - registry: registry.webbid.shop:5000 + registry: registry.webbid.store:5000 username: ${{ vars.DOCKER_REGISTRY_USERNAME }} password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} @@ -66,7 +66,7 @@ jobs: uses: docker/build-push-action@v6 with: push: true - tags: registry.webbid.shop:5000/webbid:${{ needs.infer-version.outputs.version }} + tags: registry.webbid.store:5000/webbid:${{ needs.infer-version.outputs.version }} build-args: | NODE_ENV=production BUILD_TARGET=production @@ -80,7 +80,7 @@ jobs: - name: Inspect run: | - docker buildx imagetools inspect registry.webbid.shop:5000/webbid:${{ needs.infer-version.outputs.version }} + docker buildx imagetools inspect registry.webbid.store:5000/webbid:${{ needs.infer-version.outputs.version }} deploy: name: Deploy the app with Docker Swarm @@ -89,7 +89,7 @@ jobs: environment: name: Production - url: https://webbid.shop + url: https://webbid.store steps: - uses: actions/checkout@v4 @@ -99,7 +99,7 @@ jobs: - name: Copy deployment files uses: appleboy/scp-action@v0.1.7 with: - host: webbid.shop + host: webbid.store username: ${{ secrets.DEPLOY_SSH_USER }} key: ${{ secrets.SSH_PRIVATE_KEY }} source: 'deployment/docker-compose.yaml,deployment/nginx.conf' @@ -109,7 +109,7 @@ jobs: - name: Creating .env file uses: appleboy/ssh-action@v1.1.0 with: - host: webbid.shop + host: webbid.store username: ${{ secrets.DEPLOY_SSH_USER }} key: ${{ secrets.SSH_PRIVATE_KEY }} script: | @@ -136,12 +136,12 @@ jobs: - name: Deploy uses: appleboy/ssh-action@v1.1.0 with: - host: webbid.shop + host: webbid.store username: ${{ secrets.DEPLOY_SSH_USER }} key: ${{ secrets.SSH_PRIVATE_KEY }} script: | cd /apps/webbid export $(cat .env | xargs) - docker login registry.webbid.shop:5000 -u ${{ vars.DOCKER_REGISTRY_USERNAME }} -p ${{ secrets.DOCKER_REGISTRY_PASSWORD }} - docker image pull registry.webbid.shop:5000/webbid:${{ needs.infer-version.outputs.version }} + docker login registry.webbid.store:5000 -u ${{ vars.DOCKER_REGISTRY_USERNAME }} -p ${{ secrets.DOCKER_REGISTRY_PASSWORD }} + docker image pull registry.webbid.store:5000/webbid:${{ needs.infer-version.outputs.version }} docker stack deploy -c docker-compose.yaml webbid diff --git a/Dockerfile b/Dockerfile index 384e78d..2ca279d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,8 +24,8 @@ ARG PORT=3000 ARG NEXT_PUBLIC_SERVER_URL=http://localhost:${PORT} ARG NEXT_PUBLIC_COMPANY_NAME=WebBid -ARG NEXT_PUBLIC_SUPPORT_EMAIL=support@webbid.shop -ARG NEXT_PUBLIC_DOMAIN=webbid.shop +ARG NEXT_PUBLIC_SUPPORT_EMAIL=support@webbid.store +ARG NEXT_PUBLIC_DOMAIN=webbid.store ARG NEXT_PUBLIC_SERVICE_FEE_PERCENTAGE=5 @@ -62,8 +62,8 @@ ARG PORT=3000 ARG NEXT_PUBLIC_SERVER_URL=http://localhost:${PORT} ARG NEXT_PUBLIC_COMPANY_NAME=WebBid -ARG NEXT_PUBLIC_SUPPORT_EMAIL=support@webbid.shop -ARG NEXT_PUBLIC_DOMAIN=webbid.shop +ARG NEXT_PUBLIC_SUPPORT_EMAIL=support@webbid.store +ARG NEXT_PUBLIC_DOMAIN=webbid.store ARG NEXT_PUBLIC_SERVICE_FEE_PERCENTAGE=5 diff --git a/README.md b/README.md index f15aa13..ec60167 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -[![Webbid Banner](./src/server/static/public/og.png)](https://webbid.shop) +[![Webbid Banner](./src/server/static/public/og.png)](https://webbid.store) # Webbid | Digital Marketplace -## [Check out ➡️](https://webbid.shop) +## [Check out ➡️](https://webbid.store) > Fairly simple digital marketplace, which sells digital products (e.g icon sets, wallpapers etc.) via > Stripe payment system. Alongside public interface, there is also admin panel based on Payload CMS. diff --git a/deployment/README.md b/deployment/README.md index c0f1b75..996b778 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -7,19 +7,19 @@ In order to obtain all SSL-certificates, DNS A-record is required as follows: -`A *.webbid.shop VPS_IP_ADDRESS` +`A *.webbid.store VPS_IP_ADDRESS` Next, the following command needs to be run and all steps should be taken according to the instructions given by command: ```bash -certbot certonly --manual --preferred-challenges=dns -d webbid.shop -d *.webbid.shop +certbot certonly --manual --preferred-challenges=dns -d webbid.store -d *.webbid.store ``` Afterwards, generated folder with certificates needs to be copied without symbolic links: ```bash -rsync -aL /etc/letsencrypt/live/webbid.shop/ /ssl-certificates +rsync -aL /etc/letsencrypt/live/webbid.store/ /ssl-certificates ``` Renewal procedure should take into account resolution of symblinks too if needed. @@ -41,13 +41,13 @@ htpasswd -Bc registry.password At the end of this command, password file will be written with a name like `.password` Prior to running docker container for registry with registry-docker-compose.yaml, corresponding -SSL-certificates are required: either for all subdomains `*.webbid.shop` or for a particular subdomain -`registry.webbid.shop`. +SSL-certificates are required: either for all subdomains `*.webbid.store` or for a particular subdomain +`registry.webbid.store`. In order to connect to the given registry and then push images into it, the followinf commands can be used: ```bash -docker login registry.webbid.shop +docker login registry.webbid.store ``` Afterwards, you will be prompted with username and password to be used for authentication. @@ -56,11 +56,11 @@ To push an existing image to the self-hosted registry, an image should be given a label pointing to the specific registry: ```bash -docker label webbid:0.0.1 registry.webbid.shop/webbid:0.0.1 +docker label webbid:0.0.1 registry.webbid.store/webbid:0.0.1 ``` Next, pushing is handled by the command: ```bash -docker push registry.webbid.shop/webbid:0.0.1 +docker push registry.webbid.store/webbid:0.0.1 ``` diff --git a/deployment/deployment-manager.sh b/deployment/deployment-manager.sh index 131057e..5667aeb 100755 --- a/deployment/deployment-manager.sh +++ b/deployment/deployment-manager.sh @@ -2,7 +2,7 @@ export $(cat /apps/webbid/.env | xargs) -DOCKER_REGISTRY_URL="registry.webbid.shop:5000" +DOCKER_REGISTRY_URL="registry.webbid.store:5000" pruneRegistry() { # Variables diff --git a/deployment/docker-compose.yaml b/deployment/docker-compose.yaml index 654e653..4f47245 100644 --- a/deployment/docker-compose.yaml +++ b/deployment/docker-compose.yaml @@ -25,7 +25,7 @@ services: start_period: 5s app: - image: 'registry.webbid.shop:5000/webbid:${RELEASE_VERSION}' + image: 'registry.webbid.store:5000/webbid:${RELEASE_VERSION}' depends_on: - database volumes: diff --git a/deployment/nginx.conf b/deployment/nginx.conf index 5406d12..3762b53 100644 --- a/deployment/nginx.conf +++ b/deployment/nginx.conf @@ -4,7 +4,7 @@ http { # Enable SSL and provide the certificate details server { listen 443 ssl; - server_name webbid.shop; + server_name webbid.store; ssl_certificate /ssl-certificates/fullchain.pem; ssl_certificate_key /ssl-certificates/privkey.pem; @@ -25,7 +25,7 @@ http { # Redirect HTTP to HTTPS server { listen 80; - server_name webbid.shop; + server_name webbid.store; location / { return 301 https://$host$request_uri; diff --git a/deployment/registry-docker-compose.yaml b/deployment/registry-docker-compose.yaml index 02486e4..ccfb818 100644 --- a/deployment/registry-docker-compose.yaml +++ b/deployment/registry-docker-compose.yaml @@ -11,7 +11,7 @@ services: REGISTRY_AUTH_HTPASSWD_PATH: /auth/registry.password REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data REGISTRY_HTTP_ADDR: 0.0.0.0:5000 - REGISTRY_HTTP_HOST: https://registry.webbid.shop:5000 + REGISTRY_HTTP_HOST: https://registry.webbid.store:5000 REGISTRY_HTTP_TLS_CERTIFICATE: /certs/fullchain.pem REGISTRY_HTTP_TLS_KEY: /certs/privkey.pem volumes: diff --git a/package.json b/package.json index b6443c9..186c228 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,13 @@ "version": "1.6.0", "private": true, "engines": { - "node": "20.x.x", - "pnpm": "9.6.0" + "node": "22.x.x", + "pnpm": "10.10.0" + }, + "packageManager": "pnpm@10.10.0", + "pnpm": { + "neverBuiltDependencies": [] }, - "packageManager": "pnpm@9.6.0", "files": [ ".next", "next.config.js",