OSDN Git Service

fb9ba58a913721c56f47adb1514024852a36fe54
[metasearch/grid-chef-repo.git] / cookbooks / minim-server / README.md
1 minim-server Cookbook
2 ===================
3
4 This cookbook sets up a MinimServer by Docker-compose.
5 You can build MinimServer Docker image and run it by `docker-compose`.
6
7 Note: do not push a Docker image including MinimServer to any public registries, because its re-distribution is not allowed by the [MinimServer license](http://minimserver.com/license.html).
8
9 ## Contents
10
11 - [Requirements](#requirements)
12     - [platforms](#platforms)
13     - [packages](#packages)
14 - [Attributes](#attributes)
15 - [Usage](#usage)
16     - [Recipes](#recipes)
17         - [minim-server::default](#minim-serverdefault)
18         - [minim-server::docker-compose](#minim-serverdocker-compose)
19     - [Role Examples](#role-examples)
20 - [License and Authors](#license-and-authors)
21
22 ## Requirements
23
24 ### platforms
25
26 - Debian >= 9.0
27 - Ubuntu >= 16.04
28 - CentOS,RHEL >= 7.3
29
30 ### packages
31 - none.
32
33 ## Attributes
34
35 |Key|Type|Description, example|Default|
36 |:--|:--|:--|:--|
37 |`['minim-server']['Dockerfile']['FROM']`|String|Base image in the `Dockerfile`.|See `attributes/default.rb`|
38 |`['minim-server']['docker-compose']['app_dir']`|String||`"#{node['docker-grid']['compose']['app_dir']}/minim-server"`|
39 |`['minim-server']['docker-compose']['data_dir']`|String||`"#{node['minim-server']['docker-compose']['app_dir']}/data"`|
40 |`['minim-server']['docker-compose']['dot_env']`|Hash|`.env` configurations.|See `attributes/default.rb`|
41 |`['minim-server']['docker-compose']['config']`|Hash|`docker-compose.yml` configurations.|See `attributes/default.rb`|
42
43 ## Usage
44
45 ### Recipes
46
47 #### minim-server::default
48
49 This recipe does nothing.
50
51 #### minim-server::docker-compose
52
53 This recipe generates a `docker-compose.yml` for the Minim-server.
54
55 ### Role Examples
56
57 - `roles/minim-server-on-docker.rb`
58
59 ```ruby
60 name 'minim-server-on-docker'
61 description 'Minim-server on Docker'
62
63 run_list(
64   'role[docker]',
65   'recipe[minim-server::docker-compose]',
66 )
67
68 #env_run_lists
69
70 #default_attributes
71
72 override_attributes(
73   'minim-server' => {
74     'docker-compose' => {
75       'config' => {
76         'services' => {
77           'minim-server' => {
78             'volumes' => [
79               '/path/local/media:/media:ro',
80             ],
81           },
82         },
83       },
84     },
85   },
86 )
87 ```
88
89 ## License and Authors
90
91 - Author:: whitestar at osdn.jp
92
93 ```text
94 Copyright 2018, whitestar
95
96 Licensed under the Apache License, Version 2.0 (the "License");
97 you may not use this file except in compliance with the License.
98 You may obtain a copy of the License at
99
100     http://www.apache.org/licenses/LICENSE-2.0
101
102 Unless required by applicable law or agreed to in writing, software
103 distributed under the License is distributed on an "AS IS" BASIS,
104 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
105 See the License for the specific language governing permissions and
106 limitations under the License.
107 ```