Merge CKAN+Datapusher and ODK+Build into respective single build directories

This commit is contained in:
Disassembler 2019-10-05 15:01:03 +02:00
parent d1fc5b7796
commit 6c16aedadd
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
16 changed files with 7 additions and 10 deletions

View File

@ -9,7 +9,7 @@ from lxcbuild.image import Image
parser = argparse.ArgumentParser(description='VM application builder and packager')
parser.add_argument('-f', '--force', action='store_true', help='Force rebuild already built package')
parser.add_argument('buildpath', help='Either specific "lxcfile" or "meta" file or a directory containing one')
parser.add_argument('buildpath', help='Either specific "lxcfile" or "meta" file or a directory containing at least one')
if len(sys.argv) < 2:
parser.print_usage()
@ -30,12 +30,12 @@ if os.path.isfile(buildpath):
sys.exit(1)
else:
valid_dir = False
lxcfile = os.path.join(buildpath, 'lxcfile')
meta = os.path.join(buildpath, 'meta')
if os.path.exists(lxcfile):
for entry in os.scandir(buildpath):
if entry.is_file() and (entry.name == 'lxcfile' or entry.name.endswith('.lxcfile')):
valid_dir = True
image = Image(lxcfile)
image = Image(entry.path)
image.build_and_pack(args.force)
meta = os.path.join(buildpath, 'meta')
if os.path.exists(meta):
valid_dir = True
app = App(meta)

View File

@ -31,6 +31,6 @@ RUN EOF
rm -rf /root/.cache
EOF
COPY lxc
COPY ckan-datapusher.lxc
CMD execlineb -P /run

View File

@ -39,7 +39,4 @@ EOF
# s6 required for single service due to inability of nodejs to process signals when running as PID 1
COPY lxc
MOUNT FILE /srv/openmapkit/conf/settings.js srv/openmapkit/settings.js
MOUNT DIR /srv/openmapkit/data srv/openmapkit/data
CMD s6-svscan /etc/services.d