blis-cloud-cli 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/PKG-INFO +11 -9
  2. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/commands/update.py +5 -0
  3. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/extra/docker-compose.yml +2 -2
  4. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/util/config.py +17 -0
  5. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/pyproject.toml +9 -9
  6. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/LICENSE +0 -0
  7. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/README.md +0 -0
  8. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/__init__.py +0 -0
  9. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/blis.py +0 -0
  10. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/commands/__init__.py +0 -0
  11. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/commands/docker.py +0 -0
  12. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/commands/domain.py +0 -0
  13. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/commands/install.py +0 -0
  14. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/commands/logs.py +0 -0
  15. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/commands/start.py +0 -0
  16. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/commands/status.py +0 -0
  17. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/commands/stop.py +0 -0
  18. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/commands/swap.py +0 -0
  19. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/extra/001-blis_revamp.sql +0 -0
  20. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/extra/002-blis_127.sql +0 -0
  21. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/extra/003-blis_revamp-seed.sql +0 -0
  22. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/extra/004-blis_127-seed.sql +0 -0
  23. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/extra/templates/Caddyfile.j2 +0 -0
  24. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/util/__init__.py +0 -0
  25. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/util/bash.py +0 -0
  26. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/util/caddy.py +0 -0
  27. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/util/docker_util.py +0 -0
  28. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/util/environment.py +0 -0
  29. {blis_cloud_cli-0.2.0 → blis_cloud_cli-0.2.1}/blis_cli/util/packages.py +0 -0
@@ -1,24 +1,26 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: blis-cloud-cli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Command-line tool for the BLIS web-based lab information system.
5
5
  Home-page: https://c4gblis.org/
6
6
  License: MIT
7
7
  Author: Mitchell Rysavy
8
8
  Author-email: mitchell.rysavy@gmail.com
9
- Requires-Python: >=3.10,<4.0
9
+ Requires-Python: >=3.8,<4.0
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
12
14
  Classifier: Programming Language :: Python :: 3.10
13
15
  Classifier: Programming Language :: Python :: 3.11
14
16
  Classifier: Programming Language :: Python :: 3.12
15
- Requires-Dist: Jinja2 (>=3.0.3,<3.1.0)
16
- Requires-Dist: PyYAML (>=5.4.1,<5.5.0)
17
- Requires-Dist: click (>=8.0.3,<8.1.0)
18
- Requires-Dist: colorama (>=0.4.4,<0.5.0)
19
- Requires-Dist: docker (>=5.0.3,<5.1.0)
20
- Requires-Dist: psutil (>=5.9.0,<5.10.0)
21
- Requires-Dist: requests (>=2.25.1,<2.26.0)
17
+ Requires-Dist: Jinja2 (>=3.1,<4.0)
18
+ Requires-Dist: PyYAML (>=6.0,<7.0)
19
+ Requires-Dist: click (>=8.1,<9.0)
20
+ Requires-Dist: colorama (>=0.4,<1.0)
21
+ Requires-Dist: docker (>=6.1,<7.0)
22
+ Requires-Dist: psutil (>=5.9,<6.0)
23
+ Requires-Dist: requests (>=2.25,<3.0)
22
24
  Project-URL: Repository, https://github.com/C4G/blis-cloud-cli
23
25
  Description-Content-Type: text/markdown
24
26
 
@@ -31,6 +31,11 @@ def run():
31
31
  click.secho(e, fg="red")
32
32
  return 1
33
33
 
34
+ if not config.volume_exists("blis-local"):
35
+ config.add_volume("blis-local")
36
+ config.add_mount("app", "blis-local", "/var/www/blis/local")
37
+ click.echo("Created blis-local volume.")
38
+
34
39
  if restart_blis:
35
40
  return docker_util.start_blis("app")
36
41
 
@@ -1,5 +1,3 @@
1
- version: '3'
2
-
3
1
  #####
4
2
  # This file is an example docker-compose file for deploying BLIS to a cloud provider
5
3
  # This file is used as a template, but will be rewritten by the BLIS tool as necessary.
@@ -34,6 +32,7 @@ services:
34
32
  - db
35
33
  volumes:
36
34
  - blis-files:/var/www/blis/files
35
+ - blis-local:/var/www/blis/local
37
36
  - blis-logs:/var/www/blis/log
38
37
 
39
38
  db:
@@ -51,6 +50,7 @@ services:
51
50
 
52
51
  volumes:
53
52
  blis-files:
53
+ blis-local:
54
54
  blis-logs:
55
55
  blis-mysql:
56
56
  caddy_data:
@@ -101,6 +101,23 @@ def add_volume(volname, opts=None):
101
101
  _save_compose(contents)
102
102
 
103
103
 
104
+ def volume_exists(volname):
105
+ contents = _open_compose()
106
+ return volname in contents["volumes"]
107
+
108
+
109
+ def add_mount(svc: str, volname: str, path: str):
110
+ contents = _open_compose()
111
+ vols = contents["services"][svc]["volumes"]
112
+ if not vols:
113
+ vols = []
114
+ mount = f"{volname}:{path}"
115
+ if mount not in vols:
116
+ vols.append(mount)
117
+ contents["services"][svc]["volumes"] = vols
118
+ _save_compose(contents)
119
+
120
+
104
121
  def add_section_from_template(keyname: str):
105
122
  template_section = compose_key(keyname, _load_template_yml())
106
123
  contents = _open_compose()
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "blis-cloud-cli"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Command-line tool for the BLIS web-based lab information system."
5
5
  authors = ["Mitchell Rysavy <mitchell.rysavy@gmail.com>"]
6
6
  homepage = "https://c4gblis.org/"
@@ -15,14 +15,14 @@ blis = "blis_cli.blis:main"
15
15
 
16
16
 
17
17
  [tool.poetry.dependencies]
18
- python = "^3.10"
19
- click = "~= 8.0.3"
20
- colorama = "~= 0.4.4"
21
- docker = "~= 5.0.3"
22
- Jinja2 = "~= 3.0.3"
23
- psutil = "~= 5.9.0"
24
- requests = "~= 2.25.1"
25
- PyYAML = "~= 5.4.1"
18
+ python = "^3.8"
19
+ click = "~= 8.1"
20
+ colorama = "~= 0.4"
21
+ docker = "~= 6.1"
22
+ Jinja2 = "~= 3.1"
23
+ psutil = "~= 5.9"
24
+ requests = "~= 2.25"
25
+ PyYAML = "~= 6.0"
26
26
 
27
27
 
28
28
  [build-system]
File without changes
File without changes