Skip to content

Commit

Permalink
feat(serverless,www,docs,dashboard): use lagon.dev for Lagon-hosted f…
Browse files Browse the repository at this point in the history
…unctions (#580)
  • Loading branch information
QuiiBz authored Feb 13, 2023
1 parent 7c94720 commit 74efd18
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 16 deletions.
8 changes: 8 additions & 0 deletions .changeset/shy-singers-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@lagon/serverless': patch
'@lagon/dashboard': patch
'@lagon/docs': patch
'@lagon/www': patch
---

Use lagon.dev for Lagon-hosted functions
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
Deploy Serverless Functions at the Edge
<br />
<br />
<a align="center" href="https://discord.lagon.app" alt="Discord"><img src="https://img.shields.io/discord/996005154753093713" /></a>
<a href="https://github.com/lagonapp/lagon/actions/workflows/wpt.yml" alt="web-platform-tests"><img src="https://wpt.lagon.app" /></a>
<a align="center" href="https://discord.lagon.dev" alt="Discord"><img src="https://img.shields.io/discord/996005154753093713" /></a>
<a href="https://github.com/lagonapp/lagon/actions/workflows/wpt.yml" alt="web-platform-tests"><img src="https://wpt.lagon.dev" /></a>
<br />
<br />
Open Source • TypeScript • Web APIs
Expand Down
2 changes: 1 addition & 1 deletion crates/serverless/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LAGON_ROOT_DOMAIN=lagon.app
LAGON_ROOT_DOMAIN=lagon.dev
LAGON_REGION=
LAGON_ISOLATES_CACHE_SECONDS=60
LAGON_LISTEN_ADDR=0.0.0.0:4000
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PROMETHEUS_PASSWORD=
LAGON_RESTRICT_LOGIN=false
LAGON_BLACKLISTED_FUNCTIONS_NAMES=
NEXT_PUBLIC_LAGON_ROOT_SCHEM=http
NEXT_PUBLIC_LAGON_ROOT_DOMAIN=lagon.app
NEXT_PUBLIC_LAGON_ROOT_DOMAIN=lagon.dev
NEXT_PUBLIC_SENTRY_DSN=
NEXT_PUBLIC_SENTRY_ENVIRONMENT=development
SENTRY_IGNORE_API_RESOLUTION_ERROR=1
Expand Down
4 changes: 2 additions & 2 deletions packages/dashboard/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* Example:
*
* NEXT_PUBLIC_LAGON_ROOT_SCHEM=https
* NEXT_PUBLIC_LAGON_ROOT_DOMAIN=lagon.app
* NEXT_PUBLIC_LAGON_ROOT_DOMAIN=lagon.dev
* name=hello-world
*
* -> https://hello-world.lagon.app
* -> https://hello-world.lagon.dev
*/

export function getFullCurrentDomain({ name }: { name: string }): string {
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/pages/cloud/domains.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Callout } from 'nextra-theme-docs';

By default, all Functions are assigned a unique URL, which is a subdomain of `lagon.app`, pointing to the current production Deployment. The subdomain is always the name of the Function: if your Function is named `my-function`, your unique URL will be `my-function.lagon.app`.
By default, all Functions are assigned a unique URL, which is a subdomain of `lagon.dev`, pointing to the current production Deployment. The subdomain is always the name of the Function: if your Function is named `my-function`, your unique URL will be `my-function.lagon.dev`.

All domains (custom or default) are automatically assigned an SSL certificate, provided by [Let's Encrypt](https://letsencrypt.org/).

Expand All @@ -27,15 +27,15 @@ Let's say that you have the domain `my-domain.com`, and you want to point it to
Then, use the following CNAME record to point your `www` subdomain to your Function:

```
www.my-domain.com. 60 IN CNAME my-function.lagon.app
www.my-domain.com. 60 IN CNAME my-function.lagon.dev
```

### For a subdomain

Let's say that you have the subdomain `hello.my-domain.com`, and you want to point it to your Function named `my-function`. Use the following CNAME record to point your subdomain to your Function:

```
hello.my-domain.com. 60 IN CNAME my-function.lagon.app
hello.my-domain.com. 60 IN CNAME my-function.lagon.dev
```

## Removing a domain
Expand Down
6 changes: 3 additions & 3 deletions packages/docs/pages/cloud/static-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ To deploy this Function with these static files, you can use the `-p` or `--publ
lagon deploy ./index.ts -p public
```

Your Function is now deployed to `example.lagon.app`. You can access the favicon and the image at the following URLs:
Your Function is now deployed to `example.lagon.dev`. You can access the favicon and the image at the following URLs:

- `example.lagon.app/favicon.ico`
- `example.lagon.app/images/image.png`
- `example.lagon.dev/favicon.ico`
- `example.lagon.dev/images/image.png`

In your HTML, you can reference these files using relative paths:

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/pages/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Callout } from 'nextra-theme-docs';

Thanks for wanting to contribute! That means a lot to us. You can contribute in many ways, with or without any coding required.

If you encounter any issues, you can join [our Discord](https://discord.lagon.app/) so we can help you.
If you encounter any issues, you can join [our Discord](https://discord.lagon.dev/) so we can help you.

<Callout type="info">
Need some good first issues to start with? Check out the [good first issue
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const config: DocsThemeConfig = {
</>
),
chat: {
link: 'https://discord.lagon.app/',
link: 'https://discord.lagon.dev/',
},
};

Expand Down
2 changes: 1 addition & 1 deletion www/lib/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const Header = () => {
<HeaderLink href="https://docs.lagon.app">Documentation</HeaderLink>
</div>
<div className="flex gap-8">
<HeaderLink href="https://discord.lagon.app" target="_blank">
<HeaderLink href="https://discord.lagon.dev" target="_blank">
<DiscordIcon />
Discord
</HeaderLink>
Expand Down
2 changes: 1 addition & 1 deletion www/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Home = () => {
Get email updates
</a>
<a
href="https://discord.lagon.app"
href="https://discord.lagon.dev"
target="_blank"
className="z-10 flex select-none items-center gap-1 text-sm text-gray-300 hover:text-white"
rel="noreferrer"
Expand Down

3 comments on commit 74efd18

@vercel
Copy link

@vercel vercel bot commented on 74efd18 Feb 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

www – ./www

www-git-main-lagon.vercel.app
www-lagon.vercel.app
lagon.app

@vercel
Copy link

@vercel vercel bot commented on 74efd18 Feb 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dashboard – ./packages/dashboard

dashboard-lagon.vercel.app
dashboard-git-main-lagon.vercel.app
dash.lagon.app

@vercel
Copy link

@vercel vercel bot commented on 74efd18 Feb 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./packages/docs

docs-lagon.vercel.app
lagon-docs.vercel.app
docs.lagon.app
docs-git-main-lagon.vercel.app

Please sign in to comment.