mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
Rewrite Powershell Scripts for Alternative Dockerfile
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
Write-Host "Docker cleaning: remove old containers" -ForegroundColor Blue
|
||||
docker compose down -v --remove-orphans
|
||||
Write-Host "Docker build: set up the docker containers" -ForegroundColor Blue
|
||||
docker compose build
|
||||
|
||||
# Check if an argument is provided
|
||||
if ($args.Count -gt 0) {
|
||||
# Run the build command with the argument and log output
|
||||
docker build -f $1 .
|
||||
} else {
|
||||
docker compose build
|
||||
}
|
||||
Write-Host "Docker build finished"
|
||||
@@ -4,5 +4,11 @@
|
||||
|
||||
$DateTime=Get-Date -Format "yyyyMMdd-HHmmss"
|
||||
|
||||
docker/build-log.ps1 > log/build-$DateTime.log 2>&1
|
||||
# Check if an argument is provided
|
||||
if ($args.Count -gt 0) {
|
||||
# Run the build command with the argument and log output
|
||||
docker/build-log.ps1 $args[0] > log/build-$DateTime.log 2>&1
|
||||
} else {
|
||||
docker/build-log.ps1 > log/build-$DateTime.log 2>&1
|
||||
}
|
||||
docker/seed.ps1 > log/seed-$DateTime.log 2>&1
|
||||
|
||||
Reference in New Issue
Block a user