Skip to content

Commit ea9e8b5

Browse files
author
bskimball
committed
update lucia to use the lucia next guide. Add dockerfile for Docker example. Update drizzle, auth and all dependencies
1 parent fa778ae commit ea9e8b5

15 files changed

+14778
-7362
lines changed

.dockerignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea/
2+
.astro/
3+
dist/
4+
node_modules/
5+
compose.yaml

Dockerfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:22-alpine
2+
3+
RUN apk update && apk add --no-cache sqlite curl
4+
5+
WORKDIR /app
6+
7+
COPY package*.json ./
8+
9+
RUN npm install
10+
11+
COPY . .
12+
13+
RUN npm run generate
14+
RUN npm run migrate
15+
RUN npm run build
16+
17+
EXPOSE 8080
18+
19+
CMD ["node", "run-server.mjs"]

README.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Astro Fastify Starter
22

33
This is an example repo of having astro and fastify in the same app.
4-
It's based off the fastify example in the
4+
This example is based on the fastify example in the
55
[node adapter](https://docs.astro.build/en/guides/integrations-guide/node/#middleware) section.
66
The main difference is this uses typescript. It also has an example of using the
77
[trpc fastify adapter](https://trpc.io/docs/server/adapters/fastify), so you have end-to-end type safety.
88

99
## Auth
1010

11-
Auth is set up for [Lucia](https://lucia-auth.com/).
11+
Auth was set up for [Lucia](https://lucia-auth.com/)
12+
but has been changed to the guide at [Lucia-next](https://lucia-next.pages.dev/).
1213
It's currently using username/password auth and storing to a session.
1314
That information is available to astro as well as fastify and trpc.
1415

@@ -18,7 +19,7 @@ Data access is done using [Drizzle](https://orm.drizzle.team/), and the example
1819

1920
## 🚀 Project Structure
2021

21-
Inside of your Astro project, you'll see the following folders and files:
22+
Inside your Astro project, you'll see the following folders and files:
2223

2324
```text
2425
/
@@ -32,8 +33,11 @@ Inside of your Astro project, you'll see the following folders and files:
3233
│ │ └── Card.astro
3334
│ ├── layouts/
3435
│ │ └── Layout.astro
35-
│ └── pages/
36-
│ └── index.astro
36+
│ |── pages/
37+
│ | └── index.astro
38+
| |-- middleware.ts
39+
| |-- schema.ts
40+
| |-- session.ts
3741
└── run-server.mjs
3842
└── package.json
3943
```
@@ -43,10 +47,12 @@ Inside of your Astro project, you'll see the following folders and files:
4347
All commands are run from the root of the project, from a terminal:
4448

4549
| Command | Action |
46-
| :------------------------ | :----------------------------------------------- |
50+
|:--------------------------|:-------------------------------------------------|
4751
| `npm install` | Installs dependencies |
4852
| `npm run dev` | Starts local dev server at `localhost:4321` |
4953
| `npm run build` | Build your production site to `./dist/` |
5054
| `npm run start` | Start your production build |
5155
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
52-
| `npm run astro -- --help` | Get help using the Astro CLI |
56+
| `npm run generate` | Generate schema |
57+
| `npm run migrate` | Run migrations |
58+
| `npm run studio` | Run Drizzle-kit Studio |
File renamed without changes.

0 commit comments

Comments
 (0)