fifix
This commit is contained in:
parent
bc64eb20ea
commit
06fbeb64a0
25
deployment.sh
Normal file
25
deployment.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
APP_NAME="dukcapil-backend"
|
||||||
|
PORT="4000"
|
||||||
|
NETWORK_NAME="pgnet"
|
||||||
|
|
||||||
|
echo "🔄 Pulling latest code..."
|
||||||
|
git pull
|
||||||
|
|
||||||
|
echo "🐳 Building Docker image..."
|
||||||
|
docker build -t "$APP_NAME:latest" .
|
||||||
|
|
||||||
|
echo "🛑 Stopping and removing old container..."
|
||||||
|
docker stop "$APP_NAME" 2>/dev/null || true
|
||||||
|
docker rm "$APP_NAME" 2>/dev/null || true
|
||||||
|
|
||||||
|
echo "🔌 Ensuring Docker network exists..."
|
||||||
|
docker network inspect "$NETWORK_NAME" >/dev/null 2>&1 || docker network create "$NETWORK_NAME"
|
||||||
|
|
||||||
|
echo "🚀 Running new container..."
|
||||||
|
docker run -d \
|
||||||
|
--name "$APP_NAME" \
|
||||||
|
--network "$NETWORK_NAME" \
|
||||||
|
-p "$PORT:$PORT" \
|
||||||
|
-v "$(pwd)/infra":/infra:ro \
|
||||||
|
-v "$(pwd)/templates":/templates:ro \
|
||||||
|
"$APP_NAME:latest"
|
||||||
@ -1,5 +1,5 @@
|
|||||||
server:
|
server:
|
||||||
port: "8080"
|
port: "4000"
|
||||||
|
|
||||||
postgresql:
|
postgresql:
|
||||||
host: "localhost"
|
host: "localhost"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user