Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Recrear contenedores con docker-compose #15

Merged
merged 2 commits into from
Sep 25, 2020
Merged
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
31 changes: 13 additions & 18 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,22 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
-
name: Login to GHCR
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}
-
uses: docker/setup-qemu-action@v1
- uses: docker/setup-qemu-action@v1
with:
platforms: all
-
name: Create builder
- name: Create builder
uses: docker/setup-buildx-action@v1

-
name: Build and push docker image
- uses: satackey/action-docker-layer-caching@v0.0.8
continue-on-error: true

- name: Build and push docker image
uses: docker/build-push-action@v2
with:
context: .
Expand All @@ -43,8 +42,7 @@ jobs:
SSH_PORT: ${{ secrets.SSH_PORT }}
steps:
- uses: actions/checkout@v2
-
name: Set SSH client
- name: Set SSH client
env:
SSH_PRIVATE_KEY: ${{ secrets.GA_PRIV_KEY }}
HOST_KEY: ${{ secrets.HOST_KEY }}
Expand All @@ -58,18 +56,15 @@ jobs:
echo "$SSH_HOST $HOST_KEY" > $HOME/.ssh/known_hosts
echo ::set-env name=SSH_AUTH_SOCK::$SSH_AUTH_SOCK
echo ::set-env name=SSH_AGENT_PID::$SSH_AGENT_PID
-
name: Set DOCKER_HOST
- name: Set DOCKER_HOST
run: echo "::set-env name=DOCKER_HOST::ssh://$SSH_USER@$SSH_HOST:$SSH_PORT"
-
name: Login to GHCR
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}
-
name: Pull image and run in host
- name: Pull image and run in host
run: |
docker-compose pull
docker-compose up -d
docker-compose pull --quiet
docker-compose up --force-recreate -d