Skip to content

Commit 5df85eb

Browse files
deploy service through cli
1 parent cd10701 commit 5df85eb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

stac_updater/cli.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import re
33
import shutil
4+
import subprocess
45

56
import click
67
import yaml
@@ -84,3 +85,10 @@ def add_notifications(topic_name):
8485

8586
with open(sls_config_path, 'w') as outf:
8687
yaml.dump(sls_config, outf, indent=1)
88+
89+
@stac_updater.command(name='deploy')
90+
def deploy():
91+
subprocess.call("docker build . -t stac-updater:latest", shell=True)
92+
subprocess.call("docker run --rm -v $PWD:/home/stac_updater -it stac-updater:latest package-service.sh", shell=True)
93+
subprocess.call("npm install serverless-pseudo-parameters", shell=True)
94+
subprocess.call("sls deploy -v", shell=True)

0 commit comments

Comments
 (0)