dt0/run

16 lines
428 B
Plaintext
Raw Normal View History

2018-09-09 23:29:56 +00:00
#!/usr/bin/env bash
2018-09-10 04:51:23 +00:00
docker stop dt0
docker rm dt0
docker stop dt-db
docker rm dt-db
docker network create web
2018-09-09 23:29:56 +00:00
docker network create dt-db
2018-09-10 04:51:23 +00:00
docker build -t dt0 .
2018-09-09 23:29:56 +00:00
docker run -d --restart always --name dt-db --network dt-db \
-v "$PWD/db":/var/lib/postgresql/data postgres:10.5-alpine
2018-09-10 04:51:23 +00:00
sleep 5 # give Postgres time to start
2018-09-09 23:29:56 +00:00
docker run -d --restart always --name dt0 --network dt-db \
dt0:latest
docker network connect web dt0