refactor: Enhance deployment workflow for backend and frontend images #13
@ -51,8 +51,24 @@ jobs:
|
|||||||
echo "Using ACTOR: $ACTOR"
|
echo "Using ACTOR: $ACTOR"
|
||||||
echo "Using REPO_NAME: $REPO_NAME"
|
echo "Using REPO_NAME: $REPO_NAME"
|
||||||
|
|
||||||
docker build -t git.vinylnostalgia.com/$ACTOR/$REPO_NAME-backend:latest ./be -f ./be/Dockerfile.prod
|
# Build with compression
|
||||||
|
docker build --compress -t git.vinylnostalgia.com/$ACTOR/$REPO_NAME-backend:latest ./be -f ./be/Dockerfile.prod
|
||||||
|
|
||||||
|
# Save image to tar file
|
||||||
|
docker save git.vinylnostalgia.com/$ACTOR/$REPO_NAME-backend:latest > backend.tar
|
||||||
|
|
||||||
|
# Split the tar file into smaller chunks (100MB each)
|
||||||
|
split -b 100M backend.tar backend.tar.part_
|
||||||
|
|
||||||
|
# Push each chunk
|
||||||
|
for chunk in backend.tar.part_*; do
|
||||||
|
docker load < "$chunk"
|
||||||
docker push git.vinylnostalgia.com/$ACTOR/$REPO_NAME-backend:latest
|
docker push git.vinylnostalgia.com/$ACTOR/$REPO_NAME-backend:latest
|
||||||
|
sleep 5 # Add delay between pushes
|
||||||
|
done
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
rm backend.tar backend.tar.part_*
|
||||||
|
|
||||||
- name: Build and push frontend image
|
- name: Build and push frontend image
|
||||||
env:
|
env:
|
||||||
@ -77,5 +93,21 @@ jobs:
|
|||||||
echo "Using ACTOR: $ACTOR"
|
echo "Using ACTOR: $ACTOR"
|
||||||
echo "Using REPO_NAME: $REPO_NAME"
|
echo "Using REPO_NAME: $REPO_NAME"
|
||||||
|
|
||||||
docker build -t git.vinylnostalgia.com/$ACTOR/$REPO_NAME-frontend:latest ./fe -f ./fe/Dockerfile.prod
|
# Build with compression
|
||||||
|
docker build --compress -t git.vinylnostalgia.com/$ACTOR/$REPO_NAME-frontend:latest ./fe -f ./fe/Dockerfile.prod
|
||||||
|
|
||||||
|
# Save image to tar file
|
||||||
|
docker save git.vinylnostalgia.com/$ACTOR/$REPO_NAME-frontend:latest > frontend.tar
|
||||||
|
|
||||||
|
# Split the tar file into smaller chunks (100MB each)
|
||||||
|
split -b 100M frontend.tar frontend.tar.part_
|
||||||
|
|
||||||
|
# Push each chunk
|
||||||
|
for chunk in frontend.tar.part_*; do
|
||||||
|
docker load < "$chunk"
|
||||||
docker push git.vinylnostalgia.com/$ACTOR/$REPO_NAME-frontend:latest
|
docker push git.vinylnostalgia.com/$ACTOR/$REPO_NAME-frontend:latest
|
||||||
|
sleep 5 # Add delay between pushes
|
||||||
|
done
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
rm frontend.tar frontend.tar.part_*
|
@ -1,61 +1,30 @@
|
|||||||
# Git
|
# Git files
|
||||||
.git
|
.git
|
||||||
.gitignore
|
.gitignore
|
||||||
|
|
||||||
# Python
|
# Virtual environment
|
||||||
|
.venv
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
ENV/
|
||||||
|
*.env # Ignore local .env files within the backend directory if any
|
||||||
|
|
||||||
|
# Python cache
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
*$py.class
|
*$py.class
|
||||||
*.so
|
|
||||||
.Python
|
|
||||||
env/
|
|
||||||
build/
|
|
||||||
develop-eggs/
|
|
||||||
dist/
|
|
||||||
downloads/
|
|
||||||
eggs/
|
|
||||||
.eggs/
|
|
||||||
lib/
|
|
||||||
lib64/
|
|
||||||
parts/
|
|
||||||
sdist/
|
|
||||||
var/
|
|
||||||
*.egg-info/
|
|
||||||
.installed.cfg
|
|
||||||
*.egg
|
|
||||||
|
|
||||||
# Virtual Environment
|
# IDE files
|
||||||
venv/
|
|
||||||
ENV/
|
|
||||||
|
|
||||||
# IDE
|
|
||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
.vscode/
|
||||||
*.swp
|
|
||||||
*.swo
|
|
||||||
|
|
||||||
# Logs
|
# Test artifacts
|
||||||
logs/
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# Local development
|
|
||||||
.env
|
|
||||||
.env.local
|
|
||||||
.env.*.local
|
|
||||||
|
|
||||||
# Docker
|
|
||||||
Dockerfile*
|
|
||||||
docker-compose*
|
|
||||||
.dockerignore
|
|
||||||
|
|
||||||
# Tests
|
|
||||||
tests/
|
|
||||||
test/
|
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
.coverage
|
|
||||||
htmlcov/
|
htmlcov/
|
||||||
|
.coverage*
|
||||||
|
|
||||||
# Documentation
|
# Other build/temp files
|
||||||
docs/
|
*.egg-info/
|
||||||
*.md
|
dist/
|
||||||
!README.md
|
build/
|
||||||
|
*.db # e.g., sqlite temp dbs
|
Loading…
Reference in New Issue
Block a user