Decko: you hold the cards
- More Resources
Decko (formerly "Wagn") makes elegant web development fun.
Install a new deck, and you can immediately open a browser and start collaborating on content, design, and structure. Decko creators, or "Card Sharks", use Decko to create open community sites, private knowledge management sites, project management systems, wikis, blogs, journals, forums, and more.
Ruby developers can take these creations even further with Decko's development framework. As a Decko "Monkey", you can use the innovative Mods API to create sophisticated web systems that integrate seamlessly with structures that "Sharks" create on the site.
Installation help is below. And there's lots of info at Decko.org, including:
And info about contributing to Decko is right next door.
On our docs site:
We also have API Docs on Swaggerhub.
1. install dependencies
|A database engine||MySQL (5.7+) or PostgreSQL (9.4+)|
2. install the gem
gem install decko
Watch carefully for errors!
3. create a new deck
decko new MY_DECK
MY_DECK is, of course, a variable. Use any name you like.
-f, [--force] # Overwrite files that already exist -p, [--pretend], [--no-pretend] # Run but do not make any changes -q, [--quiet], [--no-quiet] # Suppress status output -s, [--skip], [--no-skip] # Skip files that already exist -M, [--monkey], [--no-monkey] # Prepare deck for monkey (mod developer) -P, [--platypus], [--no-core-dev] # Prepare deck for platypus (core developer) -R, [--repo-path=PATH] # Path to local decko repository. # Can also specify via `env DECKO_REPO_PATH=PATH` -I, [--interactive], [--no-interactive] # Prompt with dynamic installation options
4. create / seed database
Edit the config/database.yml file as necessary. More about database configuration at https://www.decko.org/database_configuration.
cd MY_DECK decko seed
..to create and seed the database
-p, --production decko:seed production database (default) -t, --test decko:seed test database -d, --development decko:seed development database -a, --all decko:seed production, test, and development database
5. start your server
To fire up the default, built-in WEBrick server, just run:
...and point your browser to http://localhost:3000 (unless otherwise configured).
-p, [--port=port] # Runs Decko on the specified port. Defaults to 3000. -b, [--binding=IP] # Binds Decko to the specified IP. Defaults to 'localhost' in development and '0.0.0.0' in other environments'. -c, [--config=file] # Uses a custom rackup configuration. Default is config.ru. -d, [--daemon], [--no-daemon] # Runs server as a Daemon. -e, [--environment=name] # Specifies the environment in which to run this server (development/test/production). -P, [--pid=PID] # Specifies the PID file. Default is tmp/pids/server.pid. [--early-hints], [--no-early-hints] # Enables HTTP/2 early hints.
For more information, see https://decko.org/get_started.
Always back up your database and uploaded files.
2. Update Libraries
From your decko root directory run:
3. Update Database
Run the following:
4. Restart your server.
Upgrade from Wagn to Decko
If you have an old site (pre 2018), haven't upgraded in a long time, and see many references to "Wagn" in your deck, you may need to do a more involved update.
1. update references to "wagn" in file content
In your decko's root directory, edit
script/wagn, replacing "wagn" with "decko". (Keep the
same capitalization pattern.)
2. update references to "wagn" in file names.
From your decko root directory run:
mv script/wagn script/decko
3. continue as with Standard Upgrade
Upgrade pre-gem Wagn site
First check the Wagn version of your existing site.
Version 1.10 or newer
- Create a new deck using steps 1 and 2 from the installation section above.
config/database.ymlfrom the old site to the new one.
- Copy the old
local/filescontents to the new
- If you have edited
wagn.ymlin your old site, make the corresponding changes to the new
- Follow the standard upgrade procedure above.
Older than Version 1.10
Ho. Ly. Cow. Welcome back!
First update your Wagn to version 1.10 via the old update mechanisms, and then follow the directions above.
Mods are little bits of code that alter Decko behavior.
Many mods have been made into ruby gems that follow the naming pattern
All you have to do to install one of these mods is:
1. add the mod (or mods) to your Gemfile
2. download and install the gem
3. run any migrations, mergers, or scripts:
...and then restart your server.
Creating / Editing mods
If you're interested in making your own mod, the first thing to do is set up a good
development environment. This is most easily done by creating a new deck with the
-M) options, eg:
decko new MY_DECK --monkey
If you're working on an existing deck, it's often easiest just to do the above and then make the new deck use your existing files and database. However, if that's not an option, you can instead follow the following procedure:
- Make sure you have all the monkey-friendly gems in your Gemfile. If your deck was generated recently, you'll probably already have several references to these gems (eg card-mod-monkey) and will just need to uncomment them. If not, you can run the above command to create a dummy deck and copy the Gemfile over to your real one.
- In your real deck, comment out
ENV['RAILS_ENV'] ||= 'production'in
config/boot.rb. This will mean your default mode is now "development."
config/database.ymlto your liking.