mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
shaving lines
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
#!/bin/bash
|
||||
APP="$1"; CONTAINER="$2"
|
||||
|
||||
[[ -f "$HOME/DOMAIN" ]] && DOMAIN=$(< "$HOME/DOMAIN")
|
||||
|
||||
if [[ ! -f "$HOME/$APP/PORT" ]]; then
|
||||
# First deploy
|
||||
ID=$(docker run -d -p 5000 -e PORT=5000 $CONTAINER /bin/bash -c "/start web")
|
||||
echo $ID > "$HOME/$APP/CONTAINER"
|
||||
PORT=$(docker inspect $ID | ruby -e 'require"json";puts JSON.parse(STDIN.read)["NetworkSettings"]["PortMapping"]["5000"]')
|
||||
echo $PORT > "$HOME/$APP/PORT"
|
||||
if [[ $DOMAIN ]]; then
|
||||
HOSTNAME="$APP.$DOMAIN"
|
||||
if [[ -f "$HOME/DOMAIN" ]]; then
|
||||
HOSTNAME="$APP.$(< "$HOME/DOMAIN")"
|
||||
$HOME/nginx-app-conf $APP $PORT $HOSTNAME > $HOME/$APP/nginx.conf
|
||||
nc -U $HOME/reload-nginx
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user