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)
- Build Errors in Fresh Framework with DaisyUI Integration HOT 1
- Add a way to listen to partial events
- Fragment inside if (IS_BROWSER) doesn't replace an SSR-rendered else branch, keeping both rendered in the end HOT 3
- GitHub Action keeps failing when renaming tmp dirs to deno .cache for node modules HOT 2
- Unexpected behaviour using Partials and TSX Tabler Icons HOT 5
- `kv.listenQueue` prevents build mode from working HOT 3
- Submit form from Island doesn't render in POST handler HOT 2
- [Partials] Losing title after partial run
- Spliting context to a separate file doubles the result
- Splitting context consumer to another file doesn't work HOT 1
- `useContext()` hook returns nothing when join in one component with the context provider HOT 1
- More secure implementation for Islands Architecture HOT 3
- Docs about serializability are misleading HOT 4
- Docs about sharing state between islands are misleading HOT 4
- Error thrown when .env.example contains a variable not set in .env HOT 2
- Deploy to Deno Failed after Updating to 1.6.3
- Usage of deprecated Deno APIs HOT 3
- Trying to use a tailwind plugin, but seems to not be working HOT 2
- Error: The deployment failed: Relative import path "$fresh/server.ts" not prefixed with / or ./ or ../ HOT 1
- Link to Deno instead of Code Snippet
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.