initial checkin
diff --git a/containers/xos/initdb b/containers/xos/initdb
new file mode 100755
index 0000000..2b0b93e
--- /dev/null
+++ b/containers/xos/initdb
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+IMAGE_NAME=xos
+DB_HOST=$(wget http://ipinfo.io/ip -qO -)
+
+# configure db host
+docker run -it $IMAGE_NAME sed -i '0,/host/{s/host=localhost/host='$DB_HOST'/}' /opt/xos/xos_config
+CONTAINER_ID=$(docker ps -a | grep $IMAGE_NAME | head -1 |  awk '{print $1}')
+echo $CONTAINER_ID $IMAGE_NAME
+docker commit $CONTAINER_ID $IMAGE_NAME
+
+# init db schema
+docker run -it $IMAGE_NAME /opt/xos/scripts/opencloud makemigrations
+CONTAINER_ID=$(docker ps -a | grep $IMAGE_NAME | head -1 | awk '{print $1}')
+docker commit $CONTAINER_ID $IMAGE_NAME