@ossy/deployment-tools 0.0.2 → 0.0.5

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.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # deployment-tools
2
2
 
3
- Collection of scripts and tools to aid deployment of containers and static files
3
+ Command line toolkit to aid deployment of containers and static files
4
4
 
5
5
  ## Getting started
6
6
 
7
- Make sure Docker and Caddy is up and running
7
+ Make sure NodeJs and npm is installed and Docker and Caddy is up and running
8
8
  ```
9
9
  npx @ossy-se/deployment-tools start
10
10
  npx @ossy-se/deployment-tools deploy --ossyfile ./ossy.js
package/dist/index.js CHANGED
@@ -28584,7 +28584,7 @@ class DockerClient {
28584
28584
 
28585
28585
  constructor() {
28586
28586
  this.networkName = 'deployment-tools'
28587
- ;(0,external_child_process_namespaceObject.exec)(`docker network create ${this.networkName}`)
28587
+ ;(0,external_child_process_namespaceObject.exec)(`sudo docker network create ${this.networkName}`)
28588
28588
  }
28589
28589
 
28590
28590
  stopContainer({ image }) {
@@ -28854,6 +28854,7 @@ class ContainerManagerCommands {
28854
28854
 
28855
28855
 
28856
28856
 
28857
+
28857
28858
  const [_, __, command, ...restArgs] = process.argv
28858
28859
 
28859
28860
  const startHandler = () => {
@@ -28874,9 +28875,10 @@ Description=D
28874
28875
  After=network.target
28875
28876
 
28876
28877
  [Service]
28877
- Environment=DEPLOYMENT_TOOLS_PORT=3000
28878
+ Environment=DEPLOYMENT_TOOLS_DOMAIN=${domain}
28879
+ Environment=DEPLOYMENT_TOOLS_SUBDOMAIN=${subdomain}
28880
+ Environment=DEPLOYMENT_TOOLS_PORT=${port}
28878
28881
  User=root
28879
- WorkingDirectory=/%h/deployment-tools
28880
28882
  ExecStart=npx @ossy/deployment-tools start-container-manager
28881
28883
  Restart=on-failure
28882
28884
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossy/deployment-tools",
3
- "version": "0.0.2",
3
+ "version": "0.0.5",
4
4
  "description": "Collection of scripts and tools to aid deployment of containers and static files",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -11,7 +11,7 @@ class DockerClient {
11
11
 
12
12
  constructor() {
13
13
  this.networkName = 'deployment-tools'
14
- exec(`docker network create ${this.networkName}`)
14
+ exec(`sudo docker network create ${this.networkName}`)
15
15
  }
16
16
 
17
17
  stopContainer({ image }) {
package/src/index.js CHANGED
@@ -5,6 +5,7 @@ import { exec } from 'child_process'
5
5
  import arg from 'arg'
6
6
  import { ContainerManagerServer } from './container-manager-server.js'
7
7
  import { ContainerManagerCommands } from './container-manager-commands.js'
8
+ import * as config from './config.js'
8
9
 
9
10
  const [_, __, command, ...restArgs] = process.argv
10
11
 
@@ -26,9 +27,10 @@ Description=D
26
27
  After=network.target
27
28
 
28
29
  [Service]
29
- Environment=DEPLOYMENT_TOOLS_PORT=3000
30
+ Environment=DEPLOYMENT_TOOLS_DOMAIN=${config.domain}
31
+ Environment=DEPLOYMENT_TOOLS_SUBDOMAIN=${config.subdomain}
32
+ Environment=DEPLOYMENT_TOOLS_PORT=${config.port}
30
33
  User=root
31
- WorkingDirectory=/%h/deployment-tools
32
34
  ExecStart=npx @ossy/deployment-tools start-container-manager
33
35
  Restart=on-failure
34
36