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.
18 lines
540 B
18 lines
540 B
#!/bin/bash
|
|
|
|
# Check if the '--dev' argument is provided
|
|
if [ "$1" == "--dev" ]; then
|
|
echo "Run development docker"
|
|
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker compose -f docker-compose.yml up -d --build
|
|
else
|
|
echo "Run Production docker"
|
|
|
|
# 👇 VITAL CHANGES HERE:
|
|
# 1. Ensure we are on the master branch
|
|
git checkout master
|
|
|
|
# 2. Pull the latest changes from master (NOT develop)
|
|
git pull origin master
|
|
|
|
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker compose -f docker-compose.prod.yml up -d --build
|
|
fi
|