Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: hexletcomponents/devops-example-app:latest

Expand All @@ -44,5 +45,6 @@ jobs:
with:
context: .
file: services/caddy/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: hexletcomponents/devops-example-caddy:latest
16 changes: 4 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: release

on:
create:
push:
tags:
- v*

Expand All @@ -13,19 +13,11 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
# - uses: actions/checkout@v2
# - uses: docker/setup-qemu-action@v1
# - uses: docker/setup-buildx-action@v1

- uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- run: docker pull ${{ env.APP_IMAGE_NAME }}:latest
- run: docker tag ${{ env.APP_IMAGE_NAME }}:latest ${{ env.APP_IMAGE_NAME }}:${{ github.ref_name }}
- run: docker push ${{ env.APP_IMAGE_NAME }}:${{ github.ref_name }}

- run: docker pull ${{ env.CADDY_IMAGE_NAME }}:latest
- run: docker tag ${{ env.CADDY_IMAGE_NAME }}:latest ${{ env.CADDY_IMAGE_NAME }}:${{ github.ref_name }}
- run: docker push ${{ env.CADDY_IMAGE_NAME }}:${{ github.ref_name }}
# imagetools переносит манифест целиком; pull/tag/push схлопывал его в платформу раннера
- run: docker buildx imagetools create -t ${{ env.APP_IMAGE_NAME }}:${{ github.ref_name }} ${{ env.APP_IMAGE_NAME }}:latest
- run: docker buildx imagetools create -t ${{ env.CADDY_IMAGE_NAME }}:${{ github.ref_name }} ${{ env.CADDY_IMAGE_NAME }}:latest
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ compose:
compose-down:
docker compose down -v --remove-orphans

docker-push:
docker buildx build --platform linux/amd64,linux/arm64 -t hexletcomponents/devops-example-app --push .

setup: env-prepare install

install:
Expand Down Expand Up @@ -67,6 +64,3 @@ deploy:

ssh:
ssh root@`yq e '.all.children.webservers.hosts.web1.ansible_host' ansible/inventory.yml`

# Для запуска x86-образа на ARM (например, Mac M1/M2):
# docker run --platform linux/amd64 -p 3000:3000 -e SERVER_MESSAGE="Hexlet Awesome Server" hexletcomponents/devops-example-app