Leaflet Blog in Deno Fresh

update with docker

Changed files
+25 -6
lib
routes
post
+12
Dockerfile
···
+
FROM denoland/deno:ubuntu
+
+
WORKDIR /app
+
+
COPY . .
+
RUN deno cache main.ts
+
RUN deno task build
+
+
USER deno
+
EXPOSE 8000
+
+
CMD ["run", "-A", "main.ts"]
+11
docker-compose.yml
···
+
version: "3.8"
+
services:
+
deno-app:
+
build: .
+
volumes:
+
- .:/app
+
ports:
+
- "8000:8000"
+
environment:
+
- DENO_ENV=development
+
command: ["deno", "run", "--watch", "--allow-net", "main.ts"]
+2 -2
lib/env.ts
···
PLAUSIBLE_DOMAIN: "https://plausible.knotbin.xyz",
PLAUSIBLE_API_KEY: "",
NEXT_PUBLIC_BSKY_DID: "did:plc:6hbqm2oftpotwuw7gvvrui3i",
-
NEXT_PUBLIC_BSKY_PDS: "https://puffball.us-east.host.bsky.network",
+
NEXT_PUBLIC_BSKY_PDS: "https://knotbin.xyz",
};
// Use cleanEnv to validate and parse the environment variables
···
PLAUSIBLE_API_KEY: str({ default: "" }),
NEXT_PUBLIC_BSKY_DID: str({ default: "did:plc:6hbqm2oftpotwuw7gvvrui3i" }),
NEXT_PUBLIC_BSKY_PDS: url({
-
default: "https://puffball.us-east.host.bsky.network",
+
default: "https://knotbin.xyz",
}),
});
-4
routes/post/[slug].tsx
···
import { Title } from "../../components/typography.tsx";
import { getPost } from "../../lib/api.ts";
import { Head } from "$fresh/runtime.ts";
-
import { CommentSection } from "../../islands/CommentSection.tsx";
interface Post {
uri: string;
···
/>
</div>
</article>
-
<CommentSection
-
author="knotbin.xyz"
-
/>
</main>
<Footer />
</div>