2 # Cookbook Name:: minim-server
5 # Copyright 2018-2019, whitestar
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
25 case node['kernel']['machine']
27 image_name = 'minimserver'
28 base_image = 'java:8-jre'
29 download_url = "http://jminim.com/cada/MinimServer-#{minim_ver}-linux-intel.tar.gz"
31 image_name = 'minimserver-armhf'
32 base_image = 'arm32v7/openjdk:8-jre'
33 download_url = "http://jminim.com/cada/MinimServer-#{minim_ver}-linux-armhf.tar.gz"
36 default['minim-server']['Dockerfile'] = {
40 default['minim-server']['docker-compose']['autopilot'] = {
42 'log_dir' => '/var/log',
43 'wait_time' => '180s',
44 'docker-compose_opts' => '--no-ansi',
45 #'docker-compose_opts' => '', # for the old docker-compose
47 default['minim-server']['docker-compose']['app_dir'] = "#{node['docker-grid']['compose']['app_dir']}/minim-server"
48 default['minim-server']['docker-compose']['data_dir'] = "#{node['minim-server']['docker-compose']['app_dir']}/data"
50 default['minim-server']['docker-compose']['dot_env'] = {
52 'MINIM_VER' => minim_ver,
54 'url' => download_url,
56 #'url' => 'http://jminim.com/cada/MinimServer-0.8.4-linux-x64.tar.gz',
57 # Internal registry context, e.g. gitlab.io.example.com:5050/images
58 'REGISTRY' => 'local',
61 force_override['minim-server']['docker-compose']['config_format_version'] = '2'
63 # Version 2 docker-compose format
73 'image' => '${REGISTRY}/${NAME}:${MINIM_VER}',
74 'restart' => 'always',
75 'network_mode' => 'host',
77 # These volumes will be set by the minim-server::docker-compose recipe automatically.
78 #"#{node['minim-server']['docker-compose']['data_dir']}:/opt/minimserver/data:rw",
84 default['minim-server']['docker-compose']['config'] = version_2_config