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
Signed by: Disassembler
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 = 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('-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: if len(sys.argv) < 2:
parser.print_usage() parser.print_usage()
@ -30,12 +30,12 @@ if os.path.isfile(buildpath):
sys.exit(1) sys.exit(1)
else: else:
valid_dir = False valid_dir = False
lxcfile = os.path.join(buildpath, 'lxcfile') for entry in os.scandir(buildpath):
meta = os.path.join(buildpath, 'meta') if entry.is_file() and (entry.name == 'lxcfile' or entry.name.endswith('.lxcfile')):
if os.path.exists(lxcfile):
valid_dir = True valid_dir = True
image = Image(lxcfile) image = Image(entry.path)
image.build_and_pack(args.force) image.build_and_pack(args.force)
meta = os.path.join(buildpath, 'meta')
if os.path.exists(meta): if os.path.exists(meta):
valid_dir = True valid_dir = True
app = App(meta) app = App(meta)

View File

@ -31,6 +31,6 @@ RUN EOF
rm -rf /root/.cache rm -rf /root/.cache
EOF EOF
COPY lxc COPY ckan-datapusher.lxc
CMD execlineb -P /run 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 # s6 required for single service due to inability of nodejs to process signals when running as PID 1
COPY lxc 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 CMD s6-svscan /etc/services.d