Spin-up of a two-layer rotating stratified fluid in a variable depth container