Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite configuration / environment logic using @wuespace/envar #10

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Deployment

[`.env` Example](example.env) ·
[Configuration Parameters](env.md) ·
[GHCR Docker Image](https://github.com/wuespace/deno-asn-generator/pkgs/container/deno-asn-generator)
· Docker Hub Docker Image (coming soon) ·
[JSR Package](https://jsr.io/@wuespace/asn-generator) ·
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
[![Deno CI](https://github.com/wuespace/deno-asn-generator/actions/workflows/deno-ci.yml/badge.svg)](https://github.com/wuespace/deno-asn-generator/actions/workflows/deno-ci.yml)
[![Docker](https://github.com/wuespace/deno-asn-generator/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/wuespace/deno-asn-generator/actions/workflows/docker-publish.yml)

[Deployment](DEPLOY.md) · [License (MIT)](./LICENSE) ·
[Deployment](DEPLOY.md) ·
[Configuration](env.md) ·
[License (MIT)](./LICENSE) ·
[Contributing](./CONTRIBUTING.md)

---
Expand Down
36 changes: 28 additions & 8 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
name: deno-asn-generator

services:
app:
image: asngenerator
asn-generator:
image: ghcr.io/wuespace/deno-asn-generator
build:
context: .
dockerfile: Dockerfile
ports:
- "127.0.0.1:8080:8080"
env_file:
- .env
- "127.0.0.1:8080:${PORT:-8080}"
volumes:
- asn-generator-data:/app/data
environment:
ASN_NAMESPACE_RANGE: 50
ASN_PREFIX: WBD
ASN_BARCODE_TYPE: CODE128
- PORT=${PORT:-8080}
- ASN_PREFIX
- ASN_NAMESPACE_RANGE
- ASN_ENABLE_NAMESPACE_EXTENSION
- ADDITIONAL_MANAGED_NAMESPACES
- ASN_LOOKUP_URL
- ASN_LOOKUP_INCLUDE_PREFIX
- ASN_BARCODE_TYPE
- DATA_DIR
- DB_FILE_NAME
- DENO_KV_ACCESS_TOKEN
- OIDC_ISSUER
- OIDC_AUTH_SECRET
- OIDC_CLIENT_ID
- OIDC_CLIENT_SECRET
- OIDC_REDIRECT_URI
- OIDC_SCOPES
- OIDC_UID_CLAIM
- OIDC_NAME_CLAIM
- OIDC_ROLES_CLAIM

volumes:
asn-generator-data:
21 changes: 8 additions & 13 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"test": "DATA_DIR=data-test ASN_PREFIX=ASN ASN_NAMESPACE_RANGE=50 ASN_ENABLE_NAMESPACE_EXTANSION=1 deno test -A",
"docs": "deno doc --reload --html main.ts",
"lint": "DENO_FUTURE=1 deno lint && deno doc --lint main.ts lib/*/mod.ts",
"check": "deno check main.ts lib/**/*.ts"
"check": "deno check main.ts lib/**/*.ts",
"env:all": "deno task env:example && deno task env:docs",
"env:example": "deno run --allow-read --allow-write jsr:@wuespace/[email protected] example -r example.env",
"env:docs": "deno run --allow-read --allow-write jsr:@wuespace/[email protected] docs -o env.md example.env"
},
"imports": {
"$/": "./",
Expand All @@ -27,23 +30,15 @@
"@std/assert": "jsr:@std/assert@^1.0.4",
"@std/cli": "jsr:@std/cli@^1.0.5",
"@std/datetime": "jsr:@std/datetime@^0.225.2",
"@std/dotenv": "jsr:@std/dotenv@^0.225.2"
"@std/dotenv": "jsr:@std/dotenv@^0.225.2",
"@wuespace/envar": "jsr:@wuespace/envar@^1.1.1"
},
"unstable": [
"kv"
],
"unstable": ["kv"],
"compilerOptions": {
"jsx": "precompile",
"jsxImportSource": "@hono/hono/jsx"
},
"lint": {
"exclude": [
"deps/",
"dist/",
"docs/",
"node_modules/",
"vendor/",
"data/"
]
"exclude": ["deps/", "dist/", "docs/", "node_modules/", "vendor/", "data/"]
}
}
29 changes: 29 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading