smartcloud 0.4.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smartcloud/boot.rb +1 -0
- data/lib/smartcloud/credentials.rb +9 -0
- data/lib/smartcloud/grids/grid-nextcloud/.keep +0 -0
- data/lib/smartcloud/grids/nextcloud.rb +56 -0
- data/lib/smartcloud/machine.rb +7 -0
- data/lib/smartcloud/templates/dotsmartcloud/grids/grid-nextcloud/html/.keep +0 -0
- data/lib/smartcloud/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68cc89738e48e399cd83ff545c8a0790fb788d405e10b39b89884386525e17ff
|
4
|
+
data.tar.gz: add2311595fe17d489c2f5e0dc6142e7a4b99a0c3d90a9910d6be3b8edc7b311
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4921eb04bbb27f4672254bce33aada08c89b92b28df3aa805c8ddc562ad9f679dbce2e94d085bed3938bb021fa5ffe8778d0f0fbbb3dd3f2959926212bdabc77
|
7
|
+
data.tar.gz: 38caf894d976ce9944dff72a69a40a971d9cb62232f90404ee4ade9e897f6f89bb08328a371a098bc72e42c5233b35dc03911bb93b1aecf680db9eec4bdd7504
|
data/lib/smartcloud/boot.rb
CHANGED
@@ -20,6 +20,7 @@ require 'smartcloud/user'
|
|
20
20
|
require 'smartcloud/grids/elasticsearch'
|
21
21
|
require 'smartcloud/grids/minio'
|
22
22
|
require 'smartcloud/grids/mysql'
|
23
|
+
require 'smartcloud/grids/nextcloud'
|
23
24
|
require 'smartcloud/grids/nginx'
|
24
25
|
require 'smartcloud/grids/prereceiver'
|
25
26
|
require 'smartcloud/grids/redmine'
|
@@ -72,6 +72,15 @@ module Smartcloud
|
|
72
72
|
password: #{SecureRandom.hex(16)}
|
73
73
|
database_name: #{SecureRandom.hex(8)}
|
74
74
|
|
75
|
+
nextcloud:
|
76
|
+
admin_username: #{SecureRandom.hex(8)}
|
77
|
+
admin_password: #{SecureRandom.hex(16)}
|
78
|
+
database_host: mysql
|
79
|
+
database_port: 3306
|
80
|
+
database_username: #{SecureRandom.hex(8)}_nextcloud
|
81
|
+
database_password: #{SecureRandom.hex(16)}
|
82
|
+
database_name: #{SecureRandom.hex(8)}_nextcloud
|
83
|
+
|
75
84
|
elasticsearch:
|
76
85
|
port: 9200
|
77
86
|
|
File without changes
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# The main Smartcloud Grids Minio driver
|
2
|
+
module Smartcloud
|
3
|
+
module Grids
|
4
|
+
class Nextcloud < Smartcloud::Base
|
5
|
+
def initialize
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.up
|
9
|
+
if Smartcloud::Docker.running?
|
10
|
+
# Creating & Starting containers
|
11
|
+
print "-----> Creating container nextcloud ... "
|
12
|
+
if system("docker create \
|
13
|
+
--name='nextcloud' \
|
14
|
+
--env VIRTUAL_HOST=nextcloud.#{Smartcloud.config.apps_domain} \
|
15
|
+
--env LETSENCRYPT_HOST=nextcloud.#{Smartcloud.config.apps_domain} \
|
16
|
+
--env LETSENCRYPT_EMAIL=#{Smartcloud.config.sysadmin_email} \
|
17
|
+
--env LETSENCRYPT_TEST=false \
|
18
|
+
--env NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.#{Smartcloud.config.apps_domain} \
|
19
|
+
--env NEXTCLOUD_ADMIN_USER=#{Smartcloud.credentials.nextcloud[:admin_username]} \
|
20
|
+
--env NEXTCLOUD_ADMIN_PASSWORD=#{Smartcloud.credentials.nextcloud[:admin_password]} \
|
21
|
+
--env MYSQL_HOST=#{Smartcloud.credentials.nextcloud[:database_host]}:#{Smartcloud.credentials.nextcloud[:database_port]} \
|
22
|
+
--env MYSQL_USER=#{Smartcloud.credentials.nextcloud[:database_username]} \
|
23
|
+
--env MYSQL_PASSWORD=#{Smartcloud.credentials.nextcloud[:database_password]} \
|
24
|
+
--env MYSQL_DATABASE=#{Smartcloud.credentials.nextcloud[:database_name]} \
|
25
|
+
--volume='#{Smartcloud.config.user_home_path}/.smartcloud/grids/grid-nextcloud/html:/var/www/html' \
|
26
|
+
--restart='always' \
|
27
|
+
--network='nginx-network' \
|
28
|
+
nextcloud:18.0.2-apache", out: File::NULL)
|
29
|
+
|
30
|
+
system("docker network connect mysql-network nextcloud")
|
31
|
+
|
32
|
+
puts "done"
|
33
|
+
print "-----> Starting container nextcloud ... "
|
34
|
+
if system("docker start nextcloud", out: File::NULL)
|
35
|
+
puts "done"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.down
|
42
|
+
if Smartcloud::Docker.running?
|
43
|
+
# Stopping & Removing containers - in reverse order
|
44
|
+
print "-----> Stopping container nextcloud ... "
|
45
|
+
if system("docker stop 'nextcloud'", out: File::NULL)
|
46
|
+
puts "done"
|
47
|
+
print "-----> Removing container nextcloud ... "
|
48
|
+
if system("docker rm 'nextcloud'", out: File::NULL)
|
49
|
+
puts "done"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
data/lib/smartcloud/machine.rb
CHANGED
@@ -191,6 +191,9 @@ module Smartcloud
|
|
191
191
|
'grids/grid-mysql',
|
192
192
|
'grids/grid-mysql/data/***',
|
193
193
|
|
194
|
+
'grids/grid-nextcloud',
|
195
|
+
'grids/grid-nextcloud/html/***',
|
196
|
+
|
194
197
|
'grids/grid-nginx',
|
195
198
|
'grids/grid-nginx/certificates/***',
|
196
199
|
|
@@ -233,6 +236,10 @@ module Smartcloud
|
|
233
236
|
'grids/grid-mysql/data',
|
234
237
|
'grids/grid-mysql/data/.keep',
|
235
238
|
|
239
|
+
'grids/grid-nextcloud',
|
240
|
+
'grids/grid-nextcloud/html',
|
241
|
+
'grids/grid-nextcloud/html/.keep',
|
242
|
+
|
236
243
|
'grids/grid-nginx',
|
237
244
|
'grids/grid-nginx/certificates',
|
238
245
|
'grids/grid-nginx/certificates/.keep',
|
File without changes
|
data/lib/smartcloud/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartcloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timeboard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- lib/smartcloud/grids/grid-elasticsearch/.keep
|
90
90
|
- lib/smartcloud/grids/grid-minio/.keep
|
91
91
|
- lib/smartcloud/grids/grid-mysql/docker-entrypoint-initdb.d/.keep
|
92
|
+
- lib/smartcloud/grids/grid-nextcloud/.keep
|
92
93
|
- lib/smartcloud/grids/grid-nginx/.keep
|
93
94
|
- lib/smartcloud/grids/grid-prereceiver/Dockerfile
|
94
95
|
- lib/smartcloud/grids/grid-prereceiver/fcgiwrap/APKBUILD
|
@@ -265,6 +266,7 @@ files:
|
|
265
266
|
- lib/smartcloud/grids/grid-solr/sunspot/conf/solrconfig.xml
|
266
267
|
- lib/smartcloud/grids/minio.rb
|
267
268
|
- lib/smartcloud/grids/mysql.rb
|
269
|
+
- lib/smartcloud/grids/nextcloud.rb
|
268
270
|
- lib/smartcloud/grids/nginx.rb
|
269
271
|
- lib/smartcloud/grids/prereceiver.rb
|
270
272
|
- lib/smartcloud/grids/redmine.rb
|
@@ -281,6 +283,7 @@ files:
|
|
281
283
|
- lib/smartcloud/templates/dotsmartcloud/grids/grid-elasticsearch/logs/.keep
|
282
284
|
- lib/smartcloud/templates/dotsmartcloud/grids/grid-minio/data/.keep
|
283
285
|
- lib/smartcloud/templates/dotsmartcloud/grids/grid-mysql/data/.keep
|
286
|
+
- lib/smartcloud/templates/dotsmartcloud/grids/grid-nextcloud/html/.keep
|
284
287
|
- lib/smartcloud/templates/dotsmartcloud/grids/grid-nginx/certificates/.keep
|
285
288
|
- lib/smartcloud/templates/dotsmartcloud/grids/grid-nginx/fastcgi.conf
|
286
289
|
- lib/smartcloud/templates/dotsmartcloud/grids/grid-nginx/htpasswd/.keep
|