-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfile.README.html
More file actions
153 lines (111 loc) · 5.88 KB
/
file.README.html
File metadata and controls
153 lines (111 loc) · 5.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: README - Decko on Docker
— Documentation by YARD 0.9.37
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "README";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="file_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> »
<span class="title">File: README - Decko on Docker</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'>
<h1 id="decko-on-docker">Decko on Docker</h1>
<p>Docker (no relation to Decko) is a set of tools for organizing software into packages
called containers. Decko maintains several Docker images to support installing,
developing, deploying, and maintaining Decko decks.</p>
<p>The biggest advantage of using Docker is that you needn’t give a moments thought to installing dependencies (other than Docker itself). The decko app containers already have imagemagick, memcached, passenger, node, and nginx installed and configured and ready to go. And the “Decko Chambers”</p>
<p>To use the following, you will
need <a href="https://docs.docker.com/get-docker/">Docker installed</a> (and for most use cases you
will also want <a href="https://docs.docker.com/compose/install/">Docker compose</a>).</p>
<h2 id="sandbox">Sandbox</h2>
<p>If you just want to give Decko a quick try without worrying about saving your work, you
can install a sandbox with the following command:</p>
<p><code>docker run -dp 4444:80 ethn/decko-sandbox</code></p>
<p>That will install a fully operational, seeded deck that will be available on a browser on
port 4444 of the host server. For example, if you are running this command on your local
computer, you should be able to see the deck at <code>http://localhost:4444</code>.</p>
<p>Note: in the sandbox, all the data is stored inside the docker container; when the
container is gone, so is the data. <strong><em>You should NOT keep any valuable data in a sandbox
deck</em></strong>.</p>
<h2 id="decko-chambers">Decko Chambers</h2>
<p>A second set of handy Docker images is intended for folks who want standard decks <em>and
don’t need to write mod code</em>. If you’re not sure whether you need mods this is a good way
to get started with Decko. If you later decide you need mods, it’s straightforward to
upgrade.</p>
<p>The most straightforward way to install decko chambers is with decko compose.</p>
<ol>
<li>Make a directory for your deck and copy <a href="docker-compose.yml">docker-compose.yml</a> into it.</li>
<li>Edit the file and choose:
<ul>
<li>A database engine. Default is MySQL, but you can choose PostgreSQL with a little commenting / uncommenting.</li>
<li>File storage (eg for uploaded files and images). Default is to store files on the host. For that to work, you’ll only need to make a directory named <code>files</code> in your deck directory. See comments if you’d prefer cloud storage.</li>
</ul>
</li>
<li>Run the following:
<ul>
<li><code>docker compose up -d</code> # this creates your volumes, starts your containers, etc.</li>
<li><code>docker compose exec app decko setup</code> # this creates and seeds your decko database</li>
</ul>
</li>
</ol>
<p>As with the sandbox this will by default make a site available on port 4444, though that too can be configured in the docker-compose.yml file.</p>
<p>Docker gives you a lot of power to manipulate the containers, and you can consult their excellent documentation to learn more. (We highly recommend the docker tutorial.) But here are a few crucial commands:</p>
<ul>
<li><code>docker compose down</code> # shut down the containers</li>
<li><code>docker compose exec app bash</code> # open a bash shell to the app container</li>
<li><code>docker compose exec db bash</code> # open a bash shell to</li>
<li>the database container</li>
</ul>
<h3 id="upgrading">Upgrading</h3>
<p>To update an existing docker site to use a more recent decko docker image:</p>
<ol>
<li><code>docker compose pull app</code></li>
<li><code>docker compose down</code></li>
<li><code>docker compose up -d</code></li>
<li><code>docker compose exec app decko update</code></li>
</ol>
<p>For some upgrades, it may be necessary to repeat steps two and three to restart things
after running the update.</p>
<h2 id="for-monkeys">For Monkeys</h2>
<p>Increased support for monkeys who want to use Docker when developing is coming soon. The idea is to create options for <code>decko new</code> that will create the basic structure (Dockerfile, etc) to use docker containers in all stages of site creation.</p>
<p>In the meantime, you can get a sense of how that would look by looking at how the Dockerfile is structured in the docker directory in the decko repo.</p>
</div></div>
<div id="footer">
Generated on Tue Sep 16 17:44:20 2025 by
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.37 (ruby-3.2.2).
</div>
</div>
</body>
</html>