Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.build.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .env.e2e
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions .env.e2e.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -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
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ 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 }}

- name: Build and push to local registry
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
Expand All @@ -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
Expand All @@ -89,7 +89,7 @@ jobs:

environment:
name: Production
url: https://webbid.shop
url: https://webbid.store

steps:
- uses: actions/checkout@v4
Expand All @@ -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'
Expand All @@ -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: |
Expand All @@ -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
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
16 changes: 8 additions & 8 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -41,13 +41,13 @@ htpasswd -Bc registry.password <username>
At the end of this command, password file will be written with a name like `<username>.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.
Expand All @@ -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
```
2 changes: 1 addition & 1 deletion deployment/deployment-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deployment/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions deployment/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion deployment/registry-docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading