forked from ipedrazas/taiga-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·31 lines (17 loc) · 1.04 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /usr/bin/env bash
if [[ -z "$API_NAME" ]]; then
API_NAME="localhost";
fi
echo API_NAME: $API_NAME
postgres=/home/administrator/taiga-postgres
mkdir -p $postgres
#docker pull ipedrazas/taiga-back
#docker pull ipedrazas/taiga-front
docker run -d --name postgres -v $postgres:/var/lib/postgresql/data postgres
# postgres needs some time to startup
sleep 5
docker run -d --name taiga-back --link postgres:postgres ipedrazas/taiga-back
docker run -d --name taiga-front -e VIRTUAL_HOST=taiga.pisys.eu -e API_NAME=$API_NAME --link taiga-back:taiga-back --volumes-from taiga-back ipedrazas/taiga-front
docker run -it --link postgres:postgres --rm postgres sh -c "su postgres --command 'createuser -h "'$POSTGRES_PORT_5432_TCP_ADDR'" -p "'$POSTGRES_PORT_5432_TCP_PORT'" -d -r -s taiga'"
docker run -it --link postgres:postgres --rm postgres sh -c "su postgres --command 'createdb -h "'$POSTGRES_PORT_5432_TCP_ADDR'" -p "'$POSTGRES_PORT_5432_TCP_PORT'" -O taiga taiga'";
docker run -it --rm --link postgres:postgres ipedrazas/taiga-back bash regenerate.sh