You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
576 B

3 years ago
  1. # export POSTGRES_DB=codegen_db
  2. export CODEGEN_DB_HOST=localhost
  3. export CODEGEN_DB_NAME=codegen_db
  4. export CODEGEN_DB_USER=codegen_user
  5. export CODEGEN_DB_PASSWORD=password
  6. export CODEGEN_DB_PORT=5435
  7. cid=$(docker run \
  8. -e POSTGRES_DB=$CODEGEN_DB_NAME \
  9. -e POSTGRES_USER=$CODEGEN_DB_USER \
  10. -e POSTGRES_PASSWORD=$CODEGEN_DB_PASSWORD \
  11. -p $CODEGEN_DB_PORT:5432 \
  12. -d postgres:12)
  13. echo "Container id is $cid"
  14. sleep 5s
  15. # ./wait-for-it.sh localhost:5434 -s -t 300 -- echo "db started"
  16. sbtn flyway/flywayMigrate
  17. sbtn docker:publishLocal
  18. sbtn shutdown
  19. docker stop $cid
  20. docker rm $cid