Skip to content

Commit

Permalink
Merge pull request #22 from meceware/dev
Browse files Browse the repository at this point in the history
v1.0.0.rc3
  • Loading branch information
meceware authored Jan 11, 2025
2 parents 4a2d82f + 44362b6 commit 69b868c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,16 @@ docker compose -p wapydev-dev -f docker-compose-dev.yml up -d

`SUBSCRIPTION_JWT_SECRET`: The secret key for the subscription signing. When you run the `setup.sh` script, it will generate a random secret for you.

### Building Docker Image

If you want to build the Docker image locally, you can run the following command:

```
docker build -t wapy.dev -f Dockerfile .
```

Don't forget to update the `docker-compose.yml` file to use the local image.

### Database Backup and Restore

You can backup the database by running the `backup.sh` script.
Expand Down
4 changes: 2 additions & 2 deletions src/components/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ export const siteConfig = {
name: 'Wapy.dev',
description: 'Subscription and Expense Tracker',
keywords: 'subscription, expense, tracker, wapy, meceware',
url: process.env.SITE_URL,
url: process.env.SITE_URL || 'http://localhost:3000',
links: {
github: 'https://github.com/meceware/wapy.dev',
},
author: {
name: 'meceware',
url: 'https://www.meceware.com/',
},
from: 'Wapy.dev - Subscription Manager',
from: 'Wapy.dev Subscription Manager',
subscriptionReminderFrom: `Wapy.dev Subscription Reminder <${process.env.RESEND_FROM}>`,
};
10 changes: 5 additions & 5 deletions src/lib/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { PrismaAdapter } from '@auth/prisma-adapter';
import { prisma } from '@/lib/prisma';
import { siteConfig } from '@/components/config';

const authURL = new URL(`${process.env.SITE_URL}/api/auth`);
const cookiePrefix = authURL.protocol === 'https:' ? '__Secure-' : '';
const authDomain = authURL.hostname === 'localhost' ? authURL.hostname : `.${authURL.hostname.split('.').slice(-2).join('.')}`;
const authURL = new URL(`${siteConfig.url}/api/auth`);
const cookiePrefix = authURL?.protocol === 'https:' ? '__Secure-' : '';
const authDomain = authURL?.hostname ? (authURL.hostname === 'localhost' ? authURL.hostname : `.${authURL.hostname.split('.').slice(-2).join('.')}`) : '';

const html = ({ url, token }) => {
return `
Expand Down Expand Up @@ -111,10 +111,10 @@ const authConfig = {
html: html({ url, token: otp }),
text: text({ url, token: otp }),
}),
})
});

if (!res.ok)
throw new Error('Resend error: ' + JSON.stringify(await res.json()))
throw new Error('Resend error: ' + JSON.stringify(await res.json()));
},
}),
],
Expand Down

0 comments on commit 69b868c

Please sign in to comment.