#!/bin/sh

# prepare output folder
echo "Preparing output folder ..."
mkdir -p atm
cp -f docker-compose.yml.prod atm/docker-compose.yml
cp -rf initdb/ atm/
cp -f config.json atm/
cp -f import.sh atm/
cp -f README atm/
rm -f atm/amitm_images.tar
echo "Saving images into the output folder ..."
docker save -o atm/amitm_images.tar amitm_bs amitm_crf amitm_atm

# prepare output folder
echo "Building archive from the output folder ..."
tar -cvzf prod/DockerAmiTM.tgz atm

