Browse Source

Update README for Deno and Docker changes

master
buttercat1791 1 year ago
parent
commit
5194451a3a
  1. 44
      README.md

44
README.md

@ -11,38 +11,52 @@ If you would like to suggest a feature or report a bug, or submit a patch for re @@ -11,38 +11,52 @@ If you would like to suggest a feature or report a bug, or submit a patch for re
## Developing
Make sure that you have [Node.js](https://nodejs.org/en/download/package-manager) installed.
Once you've cloned this repo, install dependencies with:
Make sure that you have [Node.js](https://nodejs.org/en/download/package-manager) (v22 or above) or [Deno](https://docs.deno.com/runtime/getting_started/installation/) (v2) installed.
Once you've cloned this repo, install dependencies with NPM:
```bash
npm install
```
then start a development server:
or with Deno:
```bash
deno install
```
then start a development server with Node:
```bash
npm run dev
```
or start the server and open the app in a new browser tab:
or with Deno:
```bash
npm run dev -- --open
deno task dev
```
## Building
> We have configured Alexandria to use the static adapter. To deploy your app with a different adapter, you will need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
Alexandria is configured to run on a Node server. The [Node adapter](https://svelte.dev/docs/kit/adapter-node) works on Deno as well.
To build a production version of your app, as a static site:
To build a production version of your app with Node, use:
```bash
npm run build
```
or with Deno:
```bash
deno task build
```
You can preview the (non-static) production build with:
```bash
npm run preview
```
or with Deno:
```bash
deno task preview
```
## Docker
This docker container performs the build.
@ -72,22 +86,20 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS @@ -72,22 +86,20 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS
1d83d736322f gc-alexandria "/docker-entrypoint.…" 2 minutes ago Up 2 minutes 0.0.0.0:4174->80/tcp, [::]:4174->80/tcp gc-alexandria
```
## Docker + Bun
## Docker + Deno
This application is configured to use the Bun runtime. A Docker container is provided to handle builds and deployments.
This application is configured to use the Deno runtime. A Docker container is provided to handle builds and deployments.
To build the app for development:
To build the app for local development:
```bash
docker build -t next-alexandria -f Dockerfile.dev .
docker build -t local-alexandria -f Dockerfile.local .
```
To run the development build:
To run the local development build:
```bash
docker run -d -p 3040:3040 next-alexandria
docker run -d -p 3000:3000 local-alexandria
```
<!-- TODO: Add a production build and deployment. -->
## Testing
*These tests are under development, but will run. They will later be added to the container.*

Loading…
Cancel
Save