Comments (2)
There hasn't been a ton of progress on this front but I do want to clarify to anyone reading the thread that we do have docs on how to deploy outside of Deno. Those docs do mention the environment variable:
When packaging your Fresh app for Docker, it is important that you set the DENO_DEPLOYMENT_ID environment variable in your container. This variable needs to be set to an opaque string ID that represents the version of your application that is currently being run. This could be a Git commit hash, or a hash of all files in your project. It is critical for the function of Fresh that this ID changes when any file in your project changes - if it doesn't, incorrect caching will cause your project to not function correctly.
Ideally this would just be something like env=PROD
but ¯\_(ツ)_/¯
from fresh.
Fresh does not really have much of a prod vs dev mode. The main difference is how caching works.
For caching to work correctly in prod, a unique identifier representing the source code (ie the git commit or a source code hash) needs to be provided to fresh. This is done via the DENO_DEPLOYMENT_ID
env var. If this not set, Fresh can not cache, and thus can not activate "prod" mode.
from fresh.
Related Issues (20)
- docs: explain better the distinction between islands and components HOT 5
- Can't see unminified Preact source code in Chrome debugger
- Fresh updater fails when deno.jsonc is in parent folder HOT 1
- Support React as alternative to Preact HOT 5
- CSP nonce issue?
- dangerouslySetInnerHTML usage in <head> breaks style plugins HOT 6
- Is the way you collect statistics GDPR-compliant? HOT 3
- Hooks stop working when importing npm modules HOT 5
- Docs: code in snippet is wrong
- Conditional Island Children HOT 2
- Easy way to augment esbuild configuration HOT 4
- @tabler/icons-preact error on islands component and dev mode HOT 1
- [bug] deno compile binary does not work on other machines HOT 1
- Hook is already inside component, yet error `Hook can only be invoked from render methods` still occurs HOT 1
- Client Address Bar wont update after 303 redirect response. HOT 6
- JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. || pragmaFrag cannot be set when runtime is automatic HOT 2
- [Bug] Preact's hydrate will clear uncontrolled property(e.g.`defaultValue) HOT 1
- [bug] partial on form submit HOT 1
- ReadableStream.from not supported if a fresh app is a subfolder HOT 6
- Tailwind plugin wanders into `scss` files then crashes on build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fresh.