remove bat and sh again
This commit is contained in:
parent
8a60ec84f4
commit
25794b7148
52
deploy.bat
52
deploy.bat
|
|
@ -1,52 +0,0 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM Load environment variables from .env file
|
||||
if not exist .env (
|
||||
echo Error: .env file not found!
|
||||
echo Please create .env file with PUBLISH_TOKEN variable.
|
||||
echo See .env.example for template.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Parse .env file
|
||||
for /f "usebackq tokens=1,2 delims==" %%a in (".env") do (
|
||||
set "%%a=%%b"
|
||||
)
|
||||
|
||||
if "%PUBLISH_TOKEN%"=="" (
|
||||
echo Error: PUBLISH_TOKEN not set in .env file
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Configuration
|
||||
set GITEA_SERVER=https://brokkr.robotico.dev
|
||||
set GITEA_OWNER=dalex
|
||||
set REGISTRY=%GITEA_SERVER%/%GITEA_OWNER%
|
||||
|
||||
REM Build images
|
||||
echo Building Docker images...
|
||||
docker-compose build
|
||||
|
||||
REM Tag images for Gitea registry
|
||||
echo Tagging images for Gitea registry...
|
||||
docker tag todolist-proto-backend:latest %REGISTRY%/dalex-todo-backend:latest
|
||||
docker tag todolist-proto-frontend:latest %REGISTRY%/dalex-todo-frontend:latest
|
||||
|
||||
REM Login to Gitea registry
|
||||
echo Logging in to Gitea registry...
|
||||
echo %PUBLISH_TOKEN% | docker login %GITEA_SERVER% -u dalex --password-stdin
|
||||
|
||||
REM Push images
|
||||
echo Pushing backend image...
|
||||
docker push %REGISTRY%/dalex-todo-backend:latest
|
||||
|
||||
echo Pushing frontend image...
|
||||
docker push %REGISTRY%/dalex-todo-frontend:latest
|
||||
|
||||
echo Deployment complete!
|
||||
echo Images published to:
|
||||
echo - %REGISTRY%/dalex-todo-backend:latest
|
||||
echo - %REGISTRY%/dalex-todo-frontend:latest
|
||||
|
||||
endlocal
|
||||
46
deploy.sh
46
deploy.sh
|
|
@ -1,46 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Load environment variables
|
||||
if [ -f .env ]; then
|
||||
export $(cat .env | grep -v '^#' | xargs)
|
||||
else
|
||||
echo "Error: .env file not found!"
|
||||
echo "Please create .env file with PUBLISH_TOKEN variable."
|
||||
echo "See .env.example for template."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$PUBLISH_TOKEN" ]; then
|
||||
echo "Error: PUBLISH_TOKEN not set in .env file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Configuration
|
||||
GITEA_SERVER="https://brokkr.robotico.dev"
|
||||
GITEA_OWNER="dalex"
|
||||
REGISTRY="${GITEA_SERVER}/${GITEA_OWNER}"
|
||||
|
||||
# Build images
|
||||
echo "Building Docker images..."
|
||||
docker-compose build
|
||||
|
||||
# Tag images for Gitea registry
|
||||
echo "Tagging images for Gitea registry..."
|
||||
docker tag todolist-proto-backend:latest ${REGISTRY}/dalex-todo-backend:latest
|
||||
docker tag todolist-proto-frontend:latest ${REGISTRY}/dalex-todo-frontend:latest
|
||||
|
||||
# Login to Gitea registry
|
||||
echo "Logging in to Gitea registry..."
|
||||
echo "${PUBLISH_TOKEN}" | docker login ${GITEA_SERVER} -u dalex --password-stdin
|
||||
|
||||
# Push images
|
||||
echo "Pushing backend image..."
|
||||
docker push ${REGISTRY}/dalex-todo-backend:latest
|
||||
|
||||
echo "Pushing frontend image..."
|
||||
docker push ${REGISTRY}/dalex-todo-frontend:latest
|
||||
|
||||
echo "Deployment complete!"
|
||||
echo "Images published to:"
|
||||
echo " - ${REGISTRY}/dalex-todo-backend:latest"
|
||||
echo " - ${REGISTRY}/dalex-todo-frontend:latest"
|
||||
Loading…
Reference in New Issue