Closed Bug 1031436 Opened 10 years ago Closed 10 years ago

[commonplace] have zamboni serve commonplace projects for development

Categories

(Marketplace Graveyard :: Code Quality, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kngo, Assigned: kngo)

Details

The goal is to have Zamboni serve Commonplace projects that are unminified, that are updated live with each modification, and that are hooked up with git in order to commit changes. This revolves around the commonplace fiddle command (kind of like a grunt task). 1. Read from a json file and clone commonplace projects into a folder within Zamboni (currently being done). 2. Symlink Commonplace src folders into Zamboni's media folder to serve (currently hardlinked, but recently fixed on HEAD by a contributor). 3. Copy Commonplace projects' index.html into a git-ignored folder in mkt/commonplace/templates. 4. If settings.DEBUG, have Zamboni serve using the Commonplace development templates described in step 3. Else use the master production Commonplace index.html that expects minified CSS/JS. The workflow for a developer will then be: 1. Run Commonplace fiddle. 2. Modify Commonplace projects within the Commonplace projects folder. 3. See Zamboni serve the changes (e.g., on localhost, localhost/stats, localhost/curate, etc). 4. Since each Commonplace project is a git project, commit changes.
Assignee: nobody → kngo
Slightly different I think, this is purely to help development, not for anything production.
Will have to think about how to recompile templates on the fly. This complicates things. My first thought was to have an extra step where we run a small script that starts up all dampers in the background on different ports so that templates can get recompiled.
Priority: -- → P2
I've been thinking about this and I'm wondering if we should create a repo called "marketplace" and have it be the development environment (this would also replace the marketplace-docs repo). It can clone all the repos into it, contain the nginx config (or other options for non-nginx setups) and have some management commands to handle setting everything up and serving the files (think "marketplace init zamboni", "marketplace serve zamboni", or similar - maybe use "api" instead of "zamboni"). That way we don't have all this logic ending up in zamboni which isn't how things are served in production anyway. I'm not sure how commonplace works exactly but we could probably get this running with "commonplace fiddle" and have each repo hand its own "init" and "serve" scripts.
We have Docker as a suggested workflow now.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.